A barrier that encloses and protects the cell.