The cell membrane envelops the cell completely, creating a protective barrier that protects the components inside the cell from the outside environment. The semi-permeable nature of the cell membrane enables it to serve as a barrier and gatekeeper that regulates the transport of materials getting into and out of the cell. This protects the cell from toxic substances present in the outside environment while also expelling toxic substances out of the cell.