Most workers have payroll taxes withheld from their paychecks that go toward supporting the Social Security and Medicare programs. However, there are some employees who don't have to pay Social Security payroll taxes. Below, we'll look at those protected classes and try to explain why they're exempt from Social Security taxes.

Religious group members
Members of certain religious groups are allowed under certain circumstances to declare themselves exempt from Social Security taxes. To do so, they must be members of a recognized religious sect that is conscientiously opposed to accepting retirement or healthcare benefits under a private plan. The religious sect must also have an established track record since 1950 of making reasonable provisions for food, shelter, and medical care for its members. Examples of qualifying religious sects are the Amish and the Mennonites.

Exemptions under the religious group provision aren't automatic. To claim them, a member must file IRS Form 4029 with the Social Security Administration. Doing so keeps you from having to pay tax, but it also forces you to waive any benefits you'd otherwise be eligible to receive under Social Security.

Public employees
When the Social Security system began, it didn't cover state and local government employees, because they were typically covered under their own retirement plans. Over time, many state and local government workers have gotten Social Security coverage, either because those government entities have made special agreements with the SSA or because they're not covered by a qualifying public pension system that's functionally equivalent to Social Security.

Nevertheless, there are still some state and local employees who don't get Social Security coverage and therefore don't pay Social Security taxes. Most of these employees have money deducted from their paychecks as contributions to a public pension plan, and the exemption from Social Security effectively prevents their payroll income from being taxed twice.

Some foreign workers
In general, Social Security tax is imposed even if you're not a U.S. citizen. Working in the U.S. is enough to subject most foreign nationals to the payroll tax.

However, there are situations in which these workers are exempt. Foreign government employees are typically exempt if they're working in an official capacity related to their position with the government. Foreign students and educational professionals staying in the U.S. on certain classes of temporary visas also don't have to pay tax on their earnings from related activities.

Children working for a parent's business or in domestic activities
Children under 18 who work for their parents in a family-owned business don't have to pay Social Security payroll tax. In addition, those under 21 who work as babysitters, housekeepers, yard-care workers, or similar domestic jobs are exempt from the tax.

Not paying Social Security tax can increase your take-home pay, but it can also lead to lower benefits at retirement. Be sure to look closely at the short-term and long-term effect of an exemption from Social Security payroll tax when you're considering a position in which you'd be exempt.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at knowledgecenter@fool.com. Thanks -- and Fool on!

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.