The cell wall is the tough, usually flexible but sometimes fairly rigid layer that surrounds some types of cells. It is outside the cell membrane and gives these cells support and protection, as well as acting as a filter. The cell wall also acts as a pressure vessel, preventing over-expansion when water enters the cell by osmosis. 