All countries are in debt (other than 5 that you would not be able to pinpoint on a map). So who is loaning the money? We are – to ourselves. Governments have this enviable ability to print money (if the government does it, it is monetary policy, but if you are printing money in your basement – it is – well, illegal!). So most of the US debt and those of other countries, are owed to the country and its citizens.
The US national debt stand currently at $18T. The info graphic below is a nice illustration of the debt in 2013. Japan and China are the big external lenders at $1T each. The bulk of the debt of about $10T, however, is owed to the Fed as well as US individuals, corporations and state and local governments and pensions.
Graphic courtesy of NPR