Think of it as adding some already created functionality onto your selected elements. For example, if you want to add an effect to a button that once your mouse hovers over it, it changes color. It will look something like this.
One pseudo class is ‘:hover’
If your button is now hovered it will turn red. The ‘:hover’ is some code that has already been written and you can make use of it by referencing it.
here is one more example. Another common used pseudo class is ’ :nth-child(). It allows you to select child elements based on an argument like ‘even’
If you have 4 list items it will select 2 and 4 and make your requested changes to it