Because you don't have enough coolant in your radiator.
You should check the thermostat and the fuse for the heater.
you need a new thermostat and possibly some anitfreeze
If the heater in your 2000 Volvo S40 is blowing cold air, it could be due to low coolant levels, a malfunctioning thermostat, or a clogged heater core. Low coolant can prevent the heater core from receiving enough hot fluid to generate warmth. A stuck thermostat may not allow the engine to reach its operating temperature, resulting in cold air. Finally, a clogged heater core can restrict airflow and heat transfer, causing the heater to blow cold.
check the coolant level, or, possible stuck thermostat.
It could be the heater valve which is located under the hood to the passenger side down below the radiator and fan units.
What do you mean by "has no heat"? No air blowing out, blowing out cold air when heater is on, blowing nothing at all? Heater not turning on? What specifically is happening?
faulty control valve on heater or air in the lines
Low coolant and a clogged heater core are possibilities.
One of the reasons a 2000 Jeep Cherokee heater would randomly blow cold air and then hot air and then cold might be that there is a problem with the hot/cold duct. The air or a vent might be inadvertently blowing periodically.
One reason your home electric heater is blowing cold air is the heating elements are burned out. A bad thermostat may also be the problem.
If you are saying the heater is blowing out cold air you need to change the heater core which is located inside the dash
You may need to replace your Thermostat or your Heater Core.