China lends money directly to the U.S. by using the dollars it receives from us to buy Treasury paper. This lowers U.S. interest rates and supports the dollar, which allows us to continue to buy Chinese stuff.
Germany, on the other hand, has lent its credit rating to the whole Euro Zone, allowing countries like Greece and Spain to borrow more and at lower rates than they could have otherwise. The borrowers use some of this money to buy cars, pharmaceuticals, and solar panels from Germany.
Now both China and Germany have discovered that their surpluses were based in part on bad loans to weak borrowers, and that some of the assets they thought they owned are 1) not really theirs or 2) worth way less than face value.
China has a lot of dollars, but can’t unload them without destroying the value of the dollars it retains. It’s trying to move out slowly, scaling back its purchases of U.S. debt and buying gold and oil resources, but it has to walk a fine line because spooking the markets would defeat its purpose. So it’s stuck with big dollar balances for the foreseeable future, while the U.S. is actively destroying the currency’s value.