The outer layers of leaves and some stems have small openings called stomata, or stomas, that allow gas exchange and regulate water loss. Each stoma is opened and closed by two guard cells that surround it—when the guard cells swell, the stoma opens; when the guard cells deflate, the stoma closes.