During the day, the ground will heat up from the sun. But at night, as the ground begins to cool, the temperature will drop to the dew point -- the temperature at which the air becomes saturated. As this happens, the water vapor near the ground will condense onto objects near the surface -- such as grass, plants, cars, etc.
Grass is an excellent dew collector because it gives off its own water, making the air near the grass easier to condense.
If the dew point is below freezing, the water vapor will condense straight to frozen form -- what we see as frost.