What are the mechanism that explains this, and does this help explain the U.S.-China trade deficits?
It all boils down to the macroeconomic identity
$$ (G -T) \equiv (S – I) +(M-X), $$
where $X$ stands for exports, $M$ for imports, $G$ is government spending, $T$ are taxes, $S$ private savings and $I$ private investment.
Given $S-I$, the larger is the budget déficit, the larger the trade deficit is. $S-I$ can be thought of as the private sector excess financing ability. With this amount, it needs to finance both the budget deficit and pay for the difference between what it is able to sell abroad and what it buys abroad. If, as in the US, $S-I$ is not too large (due to low $S$), as soon as the government incurs in a budget deficit, a trade deficit will appear.
This does not tell us with which specific country the trade deficit will happen. However, it does tell us that those countries with high $S-I$ and low budget deficits (or even surpluses) need to be running trade surpluses, and this is the case of China (or Germany).
If what you have in mind via your question is the well-known macroeconomic identity $C + S + T ≡ Y ≡ C + I + G + X$, read The Identity-Equals-Causation Fallacy, Yet Again. Below, an extract that addresses your How:
There is no causation at work here. Net exports does not cause net borrowing (budget deficit), nor is it the other way around; they are identical to one another, different ways of recording the same economic events.
In conclusion, while addressing your US-vs-China concern: the accounting-like shortcut that consists of saying that USA debt to China is actually used to import goods from China is not the factual reality, only an accounting one.
How does a budget deficit help grow a trade deficit?
The causality has to be considered in the opposite direction. The real (and simplified) story behind is that, when importing/buying goods from another country, a U.S. private company is not doing so from a local one who would pays taxes and thus generates tax revenues for the U.S. government, which would in turn allow the latter to contract less debt when e.g. ensuring the continuity of its social system.