Simple. We move a few numbers over from one bank account to the other. The government isn't going to run out of money to spend. Nor is going to go bankrupt.
Listen below to the former Chairman of the Fed - Alan Greenspan as he "schools" Paul Ryan in the fact that there is no issue with government ever being able to pay for something: