How can you tell if your heater core is not working for a Chevy Malibu 2000 It blows cold air instead of hot air when on hot but every now and then it works then stops Why?

Make sure coolant level is correct It could be a clogged heater core,maybe it is a birds nest or a rats nest if the car was stored.Usually replace the heater core and it will solve it or maybe it is the radiator itself needing flushed.also it could be the switch is not throwing to the position it should be.If the car was in cold climate before maybe it froze over and then was dooshed with heater core repair stop leak.Thats the best I can guess...