The outermost layer of a cell in most plants; bacteria; fungi; and ALGAE. The cell wall is usually a rigid structure that lies external to the cell membrane, and provides a protective barrier against physical or chemical agents.