The atmosphere of Mars changes over the course of a day because the ground gets extremely cold at night on Mars, down to around minus 160°C. At such cold temperatures, both major and minor constituents of the atmosphere might either condense (snow, frost) or just stick to the soil grains a lot more than they do at warmer temperatures. Because of differing condensation temperatures and "stickiness", the composition can change significantly with the temperature.
During the day, the gases are released from the soil at varying rates as the ground warms, until the next night. It stands to reason that similar processes happen seasonally, as the water (H2O) and carbon dioxide (CO2) condense as frost and snow at the winter pole in large quantities while sublimating (evaporating directly from solid to gas) at the summer pole.
It gets complicated because it can take quite a while for gas released at one pole to reach the other. Many species may be more sticky to soil grains than to ice of the same material, so for those chemicals, the diurnal change could be more significant than the seasonal change.
The seasonal variation changes the global air pressure on Mars and changes which gases are in the air. On Mars, the air pressure can change globally by ±8%, depending on the season. The result is that there's no specific place, time of day, or season that fully represents THE composition of Mars' atmosphere. Finally, sunlight drives atmospheric chemistry by way of solar ultraviolet light breaking down CO2 and H2O molecules that are then free to react in new ways. As a result, the changing pressure and abundance of H2O and CO2 changes the abundance of carbon monoxide (CO), oxygen (O2), ozone (O3), and other trace species.