"Mandatory spending is composed of budget outlays controlled by laws other than appropriations acts, including federal spending on entitlement programs. By contrast, discretionary spending is provided and controlled through appropriations acts. Mandatory spending typically is provided in permanent or multi-year appropriations contained in an authorizing law. [...] Such funding becomes available automatically each year, without further legislative action by Congress. Some entitlement spending, such as for Medicaid, the Supplemental Nutrition Assistance Program (SNAP; formerly Food Stamps), and certain veterans' programs, is funded, but not controlled, in annual appropriations acts. [...] How mandatory programs are funded varies. Social Security is supported by payroll taxes paid by employers and employees, which are earmarked for trust funds from which benefits are paid. Medicare is funded by a combination of payroll taxes, beneficiary premiums, and general federal revenues. Medicaid is a joint federal-state program, in which the federal cost share is determined by a statutory formula. Retirement programs for those in federal service are supported by payroll deductions and contributions, as well as general revenues. Some other mandatory programs, such as veterans' income security benefits and agricultural subsidies, are typically funded from general revenues. Administrative costs of federal benefits programs are generally supported by discretionary funding, even if the benefits are paid out of mandatory funds. [...] In FY2016, mandatory spending accounts for an estimated 63% of total federal spending. In previous decades, mandatory spending accounted for a smaller share of federal outlays. In 1962, before the creation of Medicare and Medicaid, mandatory spending was less than 30% of all federal spending."
CRS Report for Congress, R44641
Federation of American Scientists: http://www.fas.org/sgp/crs/index.html