I live in the US and I run my own online business.

If I made $50k in a year (after all write-offs), and I invest all $50k in something (stock, btc, paintings, whatever), then I would have to pay capital gains tax when I go to sell.

When would I pay income tax on that $50k?

Would it be added to the capital gains tax when I sold? If so, what if I bought into the investment AFTER I already paid income tax?