How does the government borrow money?

The government gets most of its money from tax but also borrows when it wants to boost spending.