Non polar molecules are formed when each atom has an equal pull on the bonding electrons. For example Cl2
In most covalently bonded compounds, electrons are not shared equally and they are pulled towards one of the atoms (the one which has a greater pulling power)
The bond is polarised and molecule becomes polar
In H-F, fluorine pulls the bonding electrons more effectively because ot has it has a greater nuclear charge forming a molecule with a dipole (meaning 2 poles)