How are Social Security and Medicare in the USA funded?

Social Security and Medicare in the USA are funded through payroll taxes on income. Both employees and employers are required to pay payroll taxes.