The lipid molecules are amphipathic molecules i.e. they contain both the hydrophilic (Polar) groups and hydrophobic (non polar) groups.
The polar heads are directed towards the outside while the non polar regions (Tails) are directed towards the inside near each other. This arrangement of lipid molecules forms the lipid bilayer.