There are two medical programs run by the U.S. government. One, Medicare, is paid for contributions from workers' paychecks. The cost of the means-tested program for low-income folks, Medicaid, is split between the federal and state governments, though their general funds.
Medicare pays for most of the cost of hospitalization, rehabilitation, doctors' visits, labratory expenses, prescription drugs, and much other medical care for older and disabled Americans, but it still leaves almost half of all medical costs unpaid. Most people need a medigap insurance policy or Medicare managed care plan (Medicare Part C) to cover the gaps in Medicare.
For those with low income and assets, Medicaid can pay for medical expenses for who don't qualify for Medicare -- or can cover the gaps in Medicare for those who do.