You need to first determine if this is an electric or a gas dryer. Chances are the cause of the problem is different depending on this:
If an Electric Dryer:
1) Make sure you don't have a blown fuse or a tripped circuit breaker. Power to electric dryers uses 240V and uses both halves of the electric supply. If one half of the breaker or one of the two fuses is blown, it will turn but not heat (The motors are usually 120V). Please only reset this once if blown. If it blows again, it could signify another problem in the dryer.
2) Try making sure the ventelation and the dryer vent are not clogged.
3) If neither of these work, any of the following could be bad:
* Heating Element
* Safety (or high temperature limit) could be open
* Control Board or Timer
To determine which, you will need to open the dryer and have a volt meter. First, you will need to turn on the dryer and see if there is between 220 and 240 volts going to the heating element. If there is but it is not heating, chances are the heating element is bad. If there is no voltage there, you will need to trace the circuit first to see if you are getting voltage to that line further up out of the timer. If you are, chances are your thermostat or high limit is bad. If no voltage is coming out of the timer or control board, chances are the timer or board is likely bad.
If it is a Gas Dryer, you need to check the following:
1) Check the vent, and make sure it is not clogged.
2) Next, make sure the gas line is open to the dryer.
3) If neither of these fixed the problem, chances are you either have a bad Hot Surface Ignitor, a bad gas valve, or a bad high limit, a bad thermostat, or a problem with the timer or control board. To determine which, you will need to measure the current of the Hot Surface Ignitor. If it isn't getting hot enough, the gas valve will not open, and this is your most likely problem. If the ignitor is not the problem, check to see if voltage is getting to the gas valve when the comes on and has had time to heat up. if you have voltage there but the valve doesn't open, chances are it is the valve. If no voltage is occuring there, then you need to trace out the circuit and check to see if the high limit or safety thermostats are open with an ohm meter while unplugged. If these are open, replace them. If there is no voltage coming out of the timer or control board for the gas valve or ingitor, the timer or control board is likely bad and needs to be replaced.
Please note: Gas and High Voltage electrical appliances can be DANGEROUS inside, and please do not troubleshoot internally if you don't know what you are doing. If you are not comfortable with your technical abilities, please contact an appliance repair tech.