In the US, congress requires the president to do things (which necessarily requires spending money) by passing laws, and also authorizes the president to collect certain taxes to pay for those actions. Should there be any shortfall in the taxes collected, the president is nonetheless required by law to spend the required amount of money by borrowing the difference. Furthermore, the president is bound by the 14th Amendment to the Constitution, which reads, in part:
The validity of the public debt of the United States, authorized by law, including debts incurred for payment of pensions and bounties for services in suppressing insurrection or rebellion, shall not be questioned.
Thus, to anybody even vaguely versed in math, the president clearly must borrow whatever is necessary to do the job that he or she is required to do by law, and pay the money back later (with some interest, naturally).
Yet, we have an additional law referred to as the "debt limit" that caps the amount that the president is allowed to borrow, and Republicans are using this to threaten President Obama. Not being able to borrow means the President will have to not comply with certain spending, collect more taxes, borrow beyond the cap, or borrow without paying it back. The first three options violate laws, and the last option violates the Constitution.
Democracies is often messy, because the more people are allowed to voice their opinions, the more opinions you will have, and resolving the differences among 300 million citizens is no doubt a difficult and messy job. However, what we're showing the world right now is that our democracy is not just messy, but downright stupid.