The purpose of the cell membrane is to make the cell into a closed compartment that is separate from the extracellular (outside) environment. It also works as a selective barrier that can allow the import or export of molecules from the cell. Its structure consists of a lipid bilayer, with embedded proteins which are involved in transfer of molecules.