With S-Corporation tax treatment, the owner is also an employee. As such, compensation to the owner-employee flows through two different channels: payroll and distributions.
Payroll is processed through a traditional payroll process whereas distributions are most commonly a debit on the business bank account (i.e. a check draft or transfer from the business bank account to the employee-owner's personal bank account).
Compensation that flows through payroll is subject to Income taxes, Social Security tax, Medicare tax, Federal Unemployment Insurance tax and may be subject to State Unemployment Insurance tax as well as Other State and Local taxes.
Compensation that flows through distributions is subject to income tax.
There is an obvious benefit to this arrangement in that anything taxed as a distribution is not subject to Social Security tax, Medicare tax, Federal Unemployment tax, etc
This could lead one to the conclusion that it is beneficial to ONLY take distributions -- the IRS has taken this into account however, requiring the owner-employee to take a "reasonable salary" or risk having ALL the distributions recategorized as salary (therefore subject to Social Security, Medicare, etc AS WELL AS penalties and interest).
Determining a "reasonable salary" is the murkiest part of running an S-Corporation, a web search on "what is a reasonable salary for an s corp" may be helpful but it is not a substitute for a conversation with your CPA.
In conclusion, there are benefits to running as an S-Corporation but to be positioned properly to take them, the owner-employee must receive compensation through BOTH salary and distributions.