Ions have an electrical charge—negative if they have gained electrons or positive if they have lost electrons. The existence of ions suggests a transfer of electrons from one atom to another giving rise to the positive and negative charges. A useful extension of this concept is to assign hypothetical charges called oxidation numbers to atoms with polar covalent bonds. The general idea is to assign the shared electrons in each bond to the more electronegative element.
As an example, use the water molecule in a standard Lewis diagram, as shown in Figure 1.
Figure 1. Lewis structure for H2O.