Why does the bonding of oxygen and hydrogen result in a polar molecule and hydrogen bonds?
I assume you are referring to the water molecule,
Since oxygen is more electronegative than hydrogen, the two bonds that are formed will be polar covalent, which means that a partial negative charge will be on the more electronegative atom - oxygen - and two partial positive charges will be on the less electronegative atoms - hydrogen.
A net dipole moment is formed when the two dipole moments of the bonds (shown in red in the above picture) add to each other (for more on this, see vector addition), which is what ultimately determines the polar nature of the molecule.
Hydrogen bonding takes place when hydrogen is bonded to either oxygen, nitrogen, or fluorine; in the case of water, the partial negative end of one molecule will be attracted to the partial positive ends of another water molecule, which will have its partial negative end attracted to another water molecule's partial positive ends, and so on.