Describe how CSS pseudo-selectors work and provide an example of how you would use them to style alternating table rows.