The cell wall is the tough, usually flexible but sometimes fairly rigid layer that surrounds some types of cells. It is located outside the cell membrane and provides these cells with structural support and protection, and also acts as a filtering mechanism.