A lipid bilayer is a thin, protective, two layer membrane that forms around cells.
It forms due to fat and lipid molecules spontaneously arranging themselves to form a water-resistant layer that prevents ions, proteins and other molecules from diffusing into surrounding liquids. These molecules arrange themselves to form super tight junctions that act as a deflector shield against substances that try and enter the cells.
Embedded proteins within the membrane act as docking sites for other molecules. The proteins are like security guard stands that check out substances and either block them from entering or allow them to enter the cell.