In modern language, the central idea of an ionic bond is that electrons (one or more, depending on the element) were transfered between the outer rings (shells) of adjacent atoms.
1) For example, consider Na and Cl.
Sodium would lose one electron and become positively charged and the chlorine would gain one electron becoming negatively charged.
The positive/negative charge attraction would hold the two ions together.
2) Another example, magnesium and oxygen.
The magnesium would lose two electrons, becoming +2 charged and the oxygen would gain the two electrons becoming -2 charged in the process.
The positive/negative charge attraction (this time +2/-2, four times as much as the +1/-1 of NaCl) would hold the two ions together.
3) Last example, Mg and Cl.
The magnesium would lose two electrons, becoming +2 charged and two chlorines (not one) would each gain one electron, each becoming -1 charged in the process.
The three ions would adhere (bond) to each other by the positive/negative attraction between the ions.
Ionic bonds occur between metals and non-metals on the periodic table.
Turn to your periodic table and examine the three columns headed by Li (ignore hydrogen, if it is there), Be, and B. These columns provide most (not all) of the positive partners involved in ionic bonding that a high school kid will be held responsible for.
The first column (called the alkali metals) has Li, Na, K, Rb, Cs, and Fr (teachers tend to ignore Fr because it is so radioactive none exists in nature. But, these are then the little points that teachers like to spring on kids on the test. Right?) All these guys go +1 in ionic bonding.
The second column (called the alkaline earth metals) has Be, Mg, Ca, Sr, Ba and Ra. All are fair game for a teacher and all go +2 in ionic bonding.
The third column is headed by B, but usually the only atom of interest in high school is Al and its charge of +3. An example ionic compound might be AlCl3. The other elements in this column exhibit such complex patterns of behavior that they tend to get ignored in high school chemistry.
That does it (for the moment) for the positives, guys and gals. Now, on to the negatives.
Look to the column headed by F and below it, you'll see Cl, Br, I and At. (You can "ignore" At for the same reason as Fr given above.) These elements will all gain one electron in ionic bonding and will therefore be negative one.
The next column to the left is headed by O. The most common examples used from this column are O and S. Se and Te get used sparingly. Po? Nah. Gaining two electrons makes these atoms become a negative two charge in ionic bonding.
Finally, the column with N at the top and P just below. Thse guys will go -3 in ionic bonding. As and Sb are rare in high school examples and Bi is never seen as a negative three.
Three points