The guard cells surround the stomata and help to control the opening and closing of stomata thus, affecting the rate of transpiration.
The guard cells become swollen as they acquire potassium ions and thus, the stomatal opening becomes large. This leads to a drop in the water potential of the guard cell thus allowing the water to move in.
When these guard cells lose water they become flaccid and the stomatal opening is closed.
Thus, the guard cells control the opening and closing of the stomata to regulate gas and water exchange.