Year, make and model would help but, it could be a faulty thermostat, a faulty temp blend door actuator, a plugged up heater core or the coolant system is low on fluid (leak).
check heater fan to see if it is working.
if this system uses dex-cool flush the system
Low coolant? Thermostat not opening? Plugged or restricted heater core? Heater core airbound? Heater valve control cable detached or broken?
The front expansion valve is clogged.
Your heater core is likely bad
May be a defective thermostat or heater core
You have run out of coolant, or the heater matrix is blocked.
You are low on coolant to the heater core.
replace anti-freeze, replace thermostat
Because your thermostat is probably stuck open
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.
The engine needs to be hot in order for you to get got air. On a cold morning, even if you let your truck run for a while, will not get hot enough to blow hot air usually until you drive it for a little bit. When it gets at or near operating temperature there is no reason that it shouldn't blow hot air.