Spacers are used to adjust the height of your handlebars. For a more aerodynamic position you use less or none and for a more comfortable position you could use some spacers below your stem.
Spacers is a good way to try and find your ideal riding position.