I have a 2004 Ford explorer. I noticed a
clicking sound when the heater is off. But
when it is on it will not blow heated air it will
blow cold air... what do I need to do
The ductwork has blend doors that move to get the temperature to the vent where you want it. The blend door that throttles hot/cold is sticking because the door actuator is defective. You may have noticed a tapping sound under the dash from a defective actuator. Try a spray lubricant on the actuator, or remove it to see if there's a broken sprocket. Might need replacing. It's not a difficult fix.
The actuator Ed92626 is speaking of is a simple electric motor made of plastic. When one tooth breaks off the gear, it clicks. When enough teeth break off, the blend door will not move. Check the net for videos concerning the blend door actuator. There are tons of them.