The cell membrane is composed of a phosphoplipid bilayer. This bilayer is composed of amphiphilic molecules. An amphiphilic molecule is one that has both a hydrophobic end and a hydrophobic end. In this case, lipids have a hydrophobic tail and a hydrophilic head. The heads point out towards the atmosphere and inwards towards the cell interior, while the hydrophobic tails point towards each other. The complex set up results in cell's ability to select what may enter the cells. Cells require nutrient intake from the environment and need to expel certain molecules. Cell membrane has selective permeability due to the presence of phosphoplipid bilayer and selects what enters. Typically only water molecules and nutrients enter the cell while larger and polar molecules are not allowed entry in the cell.
Hope this helps.