Ionic Bonds 
Ionic bonds are formed when a metallic ion (a cation) with a positive charge is attracted to a non-metal ion (an anion) with a negative charge.  This attraction between positive and negative ions forms an ionic compound.  The bond that holds them together is an ionic bond.  This bond is electrostatic in nature.

Ion compounds can be shown forming either of two ways:
1.  Showing the ions already formed and showing the resulting compound OR
2.  Starting with the neutral atoms and showing the resulting ions being created.
Lets start with way number 1.
We've looked at the formation of ions. From the periodic table we get the following table of ions:
M stands for any metallic cation, X stands for any non-metallic anion.

                M+           M2+          M3+          X3-         X2-         X-
Group      IA            IIA            IIIA         VA        VIA       VIIA
                Li+          Be2+          Al3+          N3-        O2-         F-
                Na+        Mg2+                          P3-         S2-         Cl-
                K+          Ca2+                          As3-       Se2-        Br-
                Rb+         Sr2+                                         Te2-        I-
                Cs+         Be2+
Rules for Writing Formulas for Ionic Compounds
1.   The positive ion is given first in the formula. This is a chemistry custom.
2.   The subscripts in the formula must produce an electrically neutral formula.
3.   The subscripts should be the smallest whole numbers possible.

Write formulas for 
a) Al and Cl, 
b) Al and O, 
c)  Ba and S, 
d)  Li and N

The second way to obtain the formulas of ionic compounds is to take the subscript of one ion and make it equal to the number of charges on the other ion. (This is commonly called cross-multiplying but this is a misnomer because we totally ignore the charges on the ions).
Example:      Al3+                Cl-                  Rb2+              P3-            Li+            S2-