A rigid structure that surrounds the cells of plants, fungi, many protists, and most bacteria.