BY LAW, each year the SS surpluses are loaned to the federal government, and no, that didn't start with Reagan. Nor did it start with LBJ. It has been that way from the beginning.
The government in turn creates special issue treasury securities that are deposited in the Social Security and Medicare trust funds. These earn interest -- paid in the form of more special issue treasury securities. In a year when Social Security revenues fall short of benefits then trust fund securities are redeemed to make up the difference. This is already occurring:
"At the end of 2021, Social Securitys trust fund reserves were $2,852 billion, having decreased by $56 billion over the year." - Source: 2022 Trustees report, https://www.ssa.gov/oact/trsum/
Similarly the Medicare Trust fund.
Anyway, Social Security and Medicare benefits are primarly paid from FICA tax receipts. But now that FICA tax receipts are falling short of scheduled benefits, trust fund securities are being redeemed by the U.S. Treasury. The money to do those redemptions comes from the general fund, meaning in practice that the Treasury has to borrow it (by selling bonds like the I-bonds and the TIPS that I bought last year).
BTW, anything you read about "pilfering" of the programs is literal fucking bullshit.
Social Security Trustees 2022 report --
https://www.ssa.gov/oact/trsum/
From the above link:
Federal law requires that the Trustees invest all excess funds in interest-bearing securities backed by the full faith and credit of the United States. The Department of the Treasury currently invests all program revenues in special non-marketable U.S. Government securities, which earn interest equal to rates on marketable securities with durations defined in law. The balances in the trust funds, which represent the accumulated value, including interest, of all prior program annual surpluses and deficits, provide automatic authority to pay benefits.
All emphasis in above by Progree.
Just to be clear -- the era of "excess funds" in the above quote has been over for years. Now there is a shortage in annual SS and Medicare Hospital Fund revenue that has to be made up by redeeming trust fund securities.
(By the way, the 4 trustees are all high level Biden administratrion appointees. This isn't a report by right wing economists or the right wing media or such)
The report is signed by:
Janet Yellen, Secretary of the Treasury, and Managing Trustee of the Trust Funds.
Xavier Becerra, Secretary of Health and Human Services, and Trustee.
Martin J. Walsh, Secretary of Labor, and Trustee.
Kilolo Kijakazi, Acting Commissioner of Social Security, and Trustee.
(and if some idiot says, well what do you expect liberal Democrats to say? Well, the same language is in Trump era SS Trustees reports too, for example this snapshot from 2019:
https://web.archive.org/web/20191125074043/https://www.ssa.gov/oact/trsum/ )
Actuarial Note #142 of January 1999 (how interest rate determined, the trust fund securities etc.)
http://www.ssa.gov/OACT/NOTES/note142.html
On a related subject,
But isn't it "game over" when the SS Trust Fund runs out in about 2035? - Ans, NO
https://www.democraticunderground.com/?com=view_post&forum=1016&pid=328199
Edited to add - Its also not true that Medicare is paid for by a separate tax. Part A is (the hospital insurance part) -- its part of our FICA taxes just like SS is. But Part B and Part D are paid by general funds and premiums. That's in the Social Security Trustees report as well
https://www.ssa.gov/oact/trsum/ .