Here are some of the common reasons why you might be having this aggravating issue.
If your dryer doesn't work at all, it could be because of problems with:
Power from the houseDoor switchThermal fuseWiring
Power from the house
Check to see whether there's power getting to the dryer. Is it plugged in? If you plug something else into the outlet, does it work? If not, check for a blown fuse or tripped circuit breaker.
Door switch
If the door switch or the door-switch actuator is defective, the dryer won't work and you need to replace the failed component. The switch is inside the dryer main housing near the door frame. Sometimes you need to raise or open the top or front of the dryer to reach the switch.
Thermal fuse
On many dryers, there's a thermal fuse (a heat-sensitive fuse that blows if the dryer overheats) mounted to the exhaust duct inside the back cover panel. The fuse is about an inch long. It's usually embedded in black resin and mounted in a white plastic housing.
If the fuse has blown, it has no continuity. When this happens, your dryer either just stops heating, or it doesn't work at all. Be sure to inspect the venting/heating system before replacing the fuse to put the dryer back into operation. (You can't re-set this type of fuse.)