How to corporations pay taxes on stock they hold

How to corporations that hold stock in a brokerage account pay taxes on those dividends and sale transactions (capital gain/loss)