Base coats prevents the pigments in the nail polish from staining your nails, especially dark colors. As a bonus it increases the power of you polish. Some have hardeners in them that keep them from becoming brittle and can help them grow.
Top coats keep the polish from chipping and give your nails a glossy finish.They can come in different finishes like matte or glitter.
There are some that both Top and base coats like O.P.I's start to finish. Drugstore and dollar store brands like L.A Colors and Nikka K have them and of course Bug brand like China Glaze and O.P.I.
Matte Top Coat
Shiny
Glitter and Shiny
Sand