I'll give you the geek-friendly oversimplified version:

The U.S. government issues several varieties of securities, informally referred to as "Treasuries." Substantially anyone can own one; you can buy one directly from the US yourself (treasurydirect.com) or from any of a host of financial institutions, which both hold them for their own account and resell them routinely.

Because the US is so central to the international economy and so good a credit risk, there is an active market and infrastructure for holding Treasuries substantially everywhere. How good credit is the US government? Well, for a variety of purposes it is useful to have the notion of a "risk-free rate of return", and whatever the US is paying on treasuries is assumed to be that rate. (This is assumed to be risk-free because the US knows that default on treasuries would be cataclysmic and would do anything to stop it, and one of their options is creating more money and using it to repay treasuries as they come do, which has consequences but is not a default.)

Governments routinely hold debt securities of each other. This gets complicated, because the thing you think of as "the Japanese government" is both a) distinct from other things you might think of when you think of Japan and b) actually comprised of thousands of units that could in principle beneficially own a treasury, but the overwhelmingly most likely one by dollar weighting is the Bank of Japan as opposed to e.g. Ogaki City Hall (which could purchase a treasury on any Tuesday from anyone presently owning them, which includes every financial institution Ogaki City Hall has an account with).

The Bank of Japan does not purchase most of its Treasuries on the secondary market; they get originally issued Treasuries at auction. The Treasury runs auctions regularly: https://www.treasury.gov/resource-center/data-chart-center/q... Governments and very large financial institutions, the kind which make transactions denominated in billions of dollars, participate in the auction; the Treasury awards the newly created securities to the bidders with the most competitive (cheapest for the US) bids.

After the securities are issued and released onto the market via the auction, they are tradeable. The secondary market (technically, MANY secondary markets) for treasuries is the most liquid market for any security in the world. Large institutions, small institutions, etc etc buy and sell billions all day every day.

As it gets farther from J.P. Morgan Chase and closer to e.g. individual HNers, it is more likely that a retail investor is purchasing a Treasury either not-terribly-competitively from whomever they hold an account with and/or they're purchasing financial services from an intermediary who owns a lot of treasuries themselves either directly on the behalf of their account holders or indirectly. For example, a mutual fund could easily have hundreds of millions (all beneficially owned by fund holders), or a bank might be paying interest on their checking accounts while keeping a substantial amount of treasuries on the bank's own account. (The checking account holder doesn't have direct exposure to the treasuries.)

Make sense?