Temperature is one factor that can affect the rate of diffusion. Diffusion occurs faster in warmer temperatures, and occurs slowly in cooler temperatures.
Some minerals can form from the air combining with substances, they can form from igneous rock, and sometimes minerals can re crystalize from metamorphic rock