Polar compounds have two poles i.e. positive (+) and negative (-) in them.
These poles are created because of the difference in the electronegativity of the elements.
Since water is made up of two different elements i.e. Hydrogen (H) and Oxygen (O) that have different value of electronegativity, water is a polar solvent.
A nonpolar compound results when there is no difference in electronegativity. Example- Hydrogen gas (H2) .