for two things if its connected to the Vcc and Gnd pins then its for filtering out any ripples on the power supply. and if it is between the Xtal pins and ground then its for burden capacitance to start the pierce oscillator inside the microcontroller