A clothes dryer's timer is designed to advance from one setting to the next when the heat in the tumbler has reached certain levels for given periods of time.
Of course, the timer itself may be broken and need replacement. If the dryer seems to be cycling properly when you advance the timer control by hand, it is more likely that the timer is the problem. Some mechanical dryer timers have a small electric motor in them; this is the part that usually goes bad with these models. The way to fix this is to replace the entire timer, which you can order online by model number. Be sure to disconnect the electrical power to the dryer and turn off the gas (if it is a gas dryer) before doing any work on it.
The control panel is screwed to the top of the dryer--you can usually remove it by simply unscrewing the attachment screws. To open it, you may have to remove knobs. Don't remove the defective timer until you have the new one. Then, remove the wires from the old timer and attach them to the new timer one-by-one. Be sure to follow the directions on the new timer package, in case its design varies slightly.
If the timer does not seem to control the dryer, even when you cycle it by hand, it is more likely that something is preventing the dryer from heating properly. If the dryer is not heating as it is supposed to, the timer will not advance. In this case, it is important to look at the root causes of improper heating: a dryer vent that is working poorly (on a gas dryer), a broken thermostat, a blown thermal fuse, a broken heating element (in an electric dryer), problems with gas burners, and so forth. Please begin by seeing the article, Dryer Takes Too Long to Dry.
If the dryer does not heat at all, see Dryer Tumbles But Doesn't Heat.
A thermal fuse, which is designed to shut down the dryer from heating if it gets too hot, is likely to be the culprit. For information on this, please see How to Replace a Clothes Dryer Thermal Fuse. --DV