S corporations are real corporations under state law and provide you with all the protection of a real corporation. They act as a shield against your business creditors (assuming you have not guaranteed the corporation's debts). But S corporations are mostly disregarded for tax purposes. You pay tax on the corporation's profits (or deduct the corporation's losses) as though you were running the business as a sole proprietorship. You figure the corporation's net profits or losses, and you carry that figure to the front of your individual income tax return, adding it to (or subtracting it from) the rest of your income.
With their special status, it should come as no surprise that S corporations, in order to be recognized as such, must comply with a number of specific rules. Nor should it come as a surprise that these rules frequently get S corporation owners into trouble.