Atoms can form molecules by sharing electrons, which is called covalent bonding. Another type of bonding occurs when atoms with a net charge are electrostatically attracted to atoms or molecules with the opposite charge. Compounds that form in this way are called ionic compounds. Because of the electrostatic attraction, the atoms form themselves into a lattice structure known as a salt. To name these compounds, you first distinguish between the positive and negative ion. Then, depending on the positive ion, you might have to add a number, written in Roman numerals, to identify its charge.
TL;DR (Too Long; Didn't Read)
When naming ionic compounds, the name of the cation always comes first. Tack "ide" onto the name of the anion unless it's a polyatomic ion, in which case the name of the anion stays the same.
The Cation Goes First
The cation is the positively charged particle in an ionic compound, which means it's metallic. When identifying the compound, the name of the cation always goes first. Elements in the first two groups of the periodic table always form ions with a specific charge, so there's no need to qualify them further. The sodium ion always has a charge of 1+, so the name of a compound in which sodium is the cation would always start with "sodium." The same is true for elements in group 2, which always have a charge of 2+. For example, a compound containing calcium always starts with "calcium."
Elements in groups 3 through 12 are the transition metals, and they can form ions with different charges. For example, iron can form the ferric ion (Fe3+) and the ferrous ion (Fe2+). The name of the ionic compound indicates the charge of the cation in brackets after its name. For example, the name of a compound formed by ferric iron would begin with iron(III) while one formed with ferrous iron would begin with iron(II).
The Anion Comes Next
The anion is the negatively charged particle in the compound. Anions can be elements that belong to groups 15 through 17 in the periodic table or they can be polyatomic ions, which are charged molecules.
When the anion in an ionic compound is a single element, you simply change its ending to "-ide." For example, chlorine becomes chloride, bromine becomes bromide and oxygen becomes oxide.
When the anion is a polyatomic ion, use the name of the ion unchanged. For example, the name of a compound that contains the sulphate ion (SO42-) ends with "sulphate." An example is calcium sulphate (CaSO4), a common desiccant.
Determine the Charge on the Cation From the Chemical Formula
To summarize so far, the process for naming an ion formed from a Group 1 or 2 cation is simple. Write the name of the cation, and then write the name of the anion, changing the ending to "-ide" if it's a single element and leaving it as it is if it's a polyatomic ion. Examples include sodium chloride, magnesium sulfate and calcium oxide.
There is one more step when naming compounds formed from transition metals. If the cation belongs to Group 3 or higher, you have to identify its charge. The charge is determined by the number of anions with which it combines, which is indicated by the subscript that follows the anion as well as the valency of the anion.
Consider the example FeO. The oxide ion has a valency of 2-, so for this compound to be neutral, the iron atom must have a charge of 2+. The name of the compound is therefore iron(II) oxide. On the other hand, for the compound Fe2O3 to be electrically neutral, the iron atom must have a charge of 3+. The name of this compound is Iron(III) oxide.