What causes the air conditioner to not shut off when the car is not running?

the AC is run by a belt that is connected to the engine. if you turn the engine off, the belt stops moving. No belt movement means no power for the AC. the fan will only blow air, not cold air.