A wastegate is a valve that controls the flow of exhaust gases to the turbine wheel in a turbocharged engine system.