A dryer that tumbles but won't produce heat is almost always one of a short list of parts. The failure is usually secondary to a clogged vent — heat can't escape, the unit overheats, and a safety device shuts the heat path off.
On electric dryers: the thermal fuse is the first suspect. It's a one-time safety device that opens when temperatures exceed a threshold, and it will not reset itself. A blown thermal fuse is usually a symptom of a restricted vent or a failed high-limit thermostat, not a random failure — replacing just the fuse without clearing the vent will get you a second blown fuse in a few weeks. The heating element itself is the next most common failure, typically $150 to $300 installed.
On gas dryers: the igniter and the gas-valve solenoids are the top two failure points. An igniter that glows but doesn't ignite the gas is usually a bad radiant sensor or a failed gas-valve coil. A $40 igniter and a $60 coil kit cover the vast majority of no-heat gas-dryer calls.
Before booking service, disconnect the vent at the back of the dryer and run it for a few minutes. If the dryer heats correctly with the vent disconnected but not with it connected, the vent is restricted and that's the real fix.