Retirement tax questions

Can you explain how capital gains and ordinary income are taxed?  I understand that capital gains below 80,800 are not taxed in 2021 but does that 80,800 represent the capital gains portion of total income or total income?  For example, if I had 50,000 in capital gains and 40,000 in ordinary income how would the tax rate be determined?