The dynamics come down to r minus g. When the average nominal interest rate paid on the debt is below nominal growth, the ratio falls even with a small primary deficit. When it is above, stabilising the ratio requires a primary surplus.
This is why nominal growth and the level of long yields matter more to fiscal sustainability than the deficit headline. A shift from a negative to a positive r minus g gap changes the arithmetic from self-correcting to self-reinforcing.
Example: debt is 120% of GDP, nominal growth is 4.2% and the average interest rate on the debt is 3.4%. The favourable gap of 0.8 points reduces the ratio by 1.20 x 0.8 = about 0.96 points a year before any primary deficit is added back.
Related: real-gdp, term-premium, quarterly-refunding, current-account, treasury-auction