A government shutdown occurs when Congress and the president fail to enact appropriations legislation before October 1, the start of the federal fiscal year. The Antideficiency Act prohibits agencies from spending money they haven't been appropriated, so non-essential services halt, workers are furloughed or work without pay, and programs stop.
Essential functions like national security and emergency services continue. Shutdowns have become more frequent since the 1970s as Congress increasingly misses appropriations deadlines.