Basically, Congress decides they don't want to spend money. This can happen for various reasons. Examples(not all of which have happened, but I think these are pretty clear and realistic examples):
-no one wants to pay off our debt (republicans disagreeing with a democratic president)
-the president threatens to veto a budget plan unless something he wants in the budget is approved in return, or vice versa (like if the president, let's pretend Bush, were to threaten to veto Congressional budget plan unless we spent money on war)
I don't know if the latter of these two has happened but let's use those as an example. Like Bobson said above, its when they can't agree so they decide not to do anything that involves spending money. Since practically everything the government does involves spending money, it shuts down temporarily. Make sense?