We’re in debt because our Congress spends like drunken sailors. (Just as heinous, but a separate problem is that many in congress use their promises of future spending to buy votes.)
To come up with the money, they borrow from the Federal Reserve bank (a non-government entity owned by a group elite bankers from around the globe, the list of such owners is not published and is highly classified) and issue T-bills which are often purchased by foreigners.
The rabbit hole runs quite deep indeed.