Income received by the corporation is taxed at the corporate level according to the corporate rates then in effect. The profit remaining after taxes is available for distribution to shareholders as dividends; and if dividends are distributed, the distribution is taxed again as personal income to the shareholder.
(In the real world, small closely held corporations can easily avoid income taxes. All or almost all of the earnings are typically paid out to its employees as wages and fringe benefits. After everyone and everything is paid, there is usually no income for the corporation to owe tax upon.)