The cell wall is a very tough, flexible and sometimes fairly rigid layer that surrounds some types of cells. It surrounds the cell membrane and provides these cells with structural support and protection. In addition, the cell wall acts as a filtering mechanism. A major function of the cell wall is to act as a pressure vessel, preventing over-expansion when water enters the cell. Cell walls are found in plants, fungi and prokaryotic cells but not inmycoplasmas.