Cell membranes are structures which separate the cell from the outside (extracellular) space.
It is formed by a double membrane of phospholipids.
The part facing the cytoplasm (cytosol) and the extracellular space is soluble in water (hydrophilic), whereas the inner part is hydrophobic.
Even though it is an impermeable membrane, there are numerous proteins interspersed which form:
pores through which proteins can pass through
receptors which bind to signalling molecules which communicate with inner proteins affecting genetic production,
anchors to structural components defining the shape of the cells (cytoskeleton) etc…
The membrane is semi-permeable, so it allows diffusion of small molecules, but not electrolytes: this ultimately allows the cell to remain stable (concentration in harmony with its surroundings), and not to explode or shrink (water balance, a process called Osmosis).
It also allows the internalization of external components (endocytosis, phagocytosis) and externalization of cellular components and products (exocytosis, secretion)