There are a few reasons this could happen but the most likely is that the Thermostat is stuck open. This means when you don't have much load on the engine the Coolant which powers your heater does not have enough time to warm up. Then while driving you put a load on the engine, increasing the amount of heat created which will warm the coolant.
There could be other reasons for this is well, but I believe that in most vehicles replacing the thermostat is a somewhat simple and inexpensive job.
It could be one of the heat shields on the exhaust system
Because the heater pulls the heat off of the motor and uses fans to circulate it to you
Only blows cold air with the a/c on while driving, your cooling fan or fan clutch is bad depending on the year, make and model.......... Only blows cold air with the heater on while driving, you will have a bad or broken internal a/c - heater control door.....
what are you driving? email me direct if you wish
You have a bad blower resister..............
The heater in your car uses waste heat from the engine to heat the car. When the engine is not running there is no heat to distribute.
Possible causes are, low on coolant, thermostat stuck open, clogged heater core or vacuum scorce not getting to the heater control.
you need a new blower motor resistor
blower motor resistor is burned out
Most (not all) cars are heated by the engine. When fluid moves through the engine it heats up. This fluid moves through the heater core, a fan moves air over the warm heater coils blowing warm air out to the cars cab.
Defective Blower Motor Resistor Pack.
This can happen if the water or coolant level in the radiator is low. There are other causes but this is the most common.