A dipole is a result of a seperation of charge between two bonded atoms, when one atom has a slight positive charge and the other a slight negative charge. This is a result of the shared pair of electrons (see covalent bond definition) not residing centrally between the two atoms. Where this electron pair resides is determined by the electronegativity of the atoms present in the bond. Electronegativity (which increases as you go along a period and up a group) is the tendancy of an atom to attract the bonding (shared pair) of electrons. Therefore the shared pair of electrons will reside closer to the atom with the higher electronegativity in a bond. That atom then gains a partial negative charge due to the negative charge of the electrons and their close proximity.
So in the example of Cl-Cl: There is no difference in electronegativity as the atoms in the bond are the same. Resulting in a non-polar bond (bond without a dipole).
In H-Cl: Chlorine has a greater electronegativity than hydrogen and so gains a partial negative charge, and hydrogen a partial positive charge. This is a polar bond (bond with a dipole)