Debt to who? If every country is in debt who is the creditor? Mars?

But you actually said every major country is in debt, so do all the major countries owe money to um...minor countries?

Perhaps it is not the country that is in debt at all, but the government? In which case it must owe money to entities like people and corporations. The government has powers to take money from entities in its jurisdiction and pay its debts, it is called taxation. In fact since the money is issued by the government in the first place, you could consider a token of government debt is actually a token meant to pay your taxes with. By lending money to the government you receive interest, or in other words a discount off your future tax.

All very neat, and why a government being in debt is no reason for it to not be able to pay for things.

In fact you might argue that government debt takes money out of the economy, so keeping inflation down. This means the government can spend more without causing inflation. If a government borrows a dollar and spends that dollar, there is the same amount of dollars circulating. However if it borrows it off someone who is hoarding it, and spends it then you create gdp growth. Magic.

Perhaps it's time to get past puritanical hatred of debt?