Not a payroll expert, but I have kept books and calculated payroll for two small businesses. AFAIK, this Marketplace explainer reflects my experience:
Payroll tax, the 12 percent tax taken out of salaried workers’ paychecks, split between employer and employee, primarily funds Social Security, accounting for 88 percent of the payouts in 2017. Undocumented workers typically use a fake SSN or someone else’s SSN when applying for salaried jobs. Only a handful of U.S. states require employers to check an employee’s eligibility and their SSN through E-Verify, a Department of Homeland Security database. Other states have varying levels of E-Verify requirements, from partial to none.
Edited to belatedly add the 1099, self-employment section:
Undocumented immigrants’ payments into the Social Security funds become a murkier matter when they are self-employed. By law, anyone earning an income while in the United States is required to pay taxes, even if they are breaking other laws in doing so.
“The government, the IRS, will never say no to your tax dollars,” said Abigail Zapote, the executive director of the D.C.-based nonprofit Latinos for a Secure Retirement, with a laugh.
Many undocumented sole proprietors, from gardeners to tech startup founders, pay self-employment taxes through an Individual Taxpayer Identification Number, legally issued by the IRS. It would be easy enough not to pay anything to the IRS, especially if paid in cash. But many undocumented immigrants do file with an ITIN to be in good standing with the government should there be an opportunity to apply for a green card or citizenship in the future. Undocumented immigrants who pay self-employment taxes via an ITIN also pay into the Social Security funds, however there are no statistics on exact dollar amounts.