The easy but most likely too simple answer is that if you reported the income on your personal tax return (passed through) are distributions. This is where your equity/contributions/basis become important because you do not have to pay tax on any distribution that is a return of your capital (investment) in the business. Another thing you have to be aware of is the reasonable compensation that you are required to take- the S Crop must issue you a W2 and pay the corresponding employment taxes etc.
if you have not been taking a salary you have a tax issue besides the balance sheet. the IRS frowns on situations where an active S-Corp owner fails to take a salary. if caught, the penalties and interest can be substantial. there could also be an effect on your personal income taxes as well. the IRS tells the state so as a minimum similar penalties and interest. also, the IRS/state can go back a minimum of 3 years to give you an even bigger bill.
**************
what you may be missing is that you and the S-Corp each pay FICA and Medicare taxes on that "salary". if you are already at the maximum wages for FICA you get your share refunded when you file your 1040 but the S-Corp does not get back its share. as you know there is no limit wage/self-employment income subject to Medicare taxes.