How do capital gains taxes work?

How Do Capital Gains Taxes Work?