A government shutdown happens when Congress fails to pass funding bills or a stopgap measure to keep federal agencies operating.