The cell membrane is comprised of molecules with a phosphate head and hydrocarbon tail. The phosphate heads are polar, therfore they are hydrophilic and form favourable interactions with water, so line the outside of the membrane. The fatty acid, hydrocarbon tails are non-polar and are hydrophobic so face inwards to the centre of the membrane.
Due to the interactions between the hydrophobic tails in the centre and between the hydrophilic heads and water on the outside, it creates a very stable membrane.