There are a few types of income from investments.
First, there are capital gains. If you buy a share for $100 and sell it for $300, you'll pay tax on the $200 of gain. This is taxed at your normal income tax rate if you held the stock for a year or less, or at a lower rate if you held it for more than a year.
Then there are dividends. Many stocks and stock funds pay these. If you own the stock long enough (for a majority of the 121-day period surrounding the dividend date), these count as "qualified dividends" and the tax is at the same low rate as you pay for long-term capital gains. Otherwise the dividend is taxed at your regular income tax rate.
If you own bonds or REITs the payments you receive from these do not count as qualified dividends. You always owe regular income tax rate on these.
If you're in the US, brokers generally don't do withholding. You'll need to either increase the withholding out of your paycheck by enough to pay these taxes, or send the IRS estimated taxes to cover the amount.
All of this is for investments in a taxable account. If you invest in a retirement account, you don't pay any of these taxes right away. It's all taxed when you withdraw the money (for a "traditional" retirement account) or when you put it in (for a Roth account), but never in between.