The cell membrane is a lipid bilayer made of amphipathic phospholipids, which is fluid and selectively permeable to ions and organic molecules, given that the inside of the cell membrane is hydrophobic and the outside is hydrophilic.
The physical characteristics of the cell membrane, along with the proteins and other biomolecules embedded in it, control what enters and leaves the cell.
What the cell membrane DOESN'T do, is control the nucleus of the cell.