A Shutdown Primer: What Happens When the Government Stops Working?

What happens during a government shutdown? Which agencies are affected, and how does a shutdown impact the Affordable Care Act?