An ion is formed when electrons are moved to or from an atom or molecule. This results in a net electrical charge of the substance. The most simple ions are atomic ions, which are formed when an atom takes up or gives away one or more electrons to achieve a full valence shell.
An ion can be described as a cation (positive ion), or an anion (negative ion). It is also common to describe the charge by using valency, for example saying that an ion is a divalent cation (two positive charges).
Ions that have noble gas shells (8 electrons in the valence shell) are stable. This means that atoms from group 1 (the alkali metals), which have one valence electron can donate it away, and become a monovalent cations (one positive charge). In a similar manner, the alkaline earth metals of group 2 can donate away 2 electrons to become divalent cations (two positive charges).
On the other end of the periodic table we have group 16 (the oxygen family), which have 6 valence electrons, and thus can take up two electrons to become divalent anions (two negative charges). Group 17 (the halogens) have 7 valence electrons, and can take up one electron to become monovalent anions.
When positive and negative ions come into contact with each other, they attract due to electrostatic interactions, and create a salt.
A salt (also called ionic compound) has no net charge, since the charges of the ions cancel each other out. The salt is made up from ions which are packed in a repeating pattern which makes sure each individual ion is in contact with similarly charged ions as little as possible.
You always describe a salt without indicating charges. NaCl (sodium chloride = table salt), NaF (sodium fluoride = a content of tooth paste), and so on. To identify that a substance is a salt, you can look at the constituents of the substance. If it's a combination of a metal and nonmetal, it is usually a salt.
If you wish to write out charges of individual ions, you write them in the top right corner of the chemical sign. For the sodium ion you write: Na+. For the calcium ion: Ca2+. For the chloride ion: Cl−.
We will look at table salt, which is one of our most common salts that we come into contact with in our daily lives. It has the chemical formula NaCl.
As free atoms, the sodium ion have one valence electron, and the chlorine atom has seven valence electrons. Since a noble gas shell with 8 valence electrons is much more energetically stable, the sodium atom will donate a single electron to the chlorine atom. Both now have a full valence shell, and have become ions. The sodium ion is positively charged since it gave away an electron, and thus has one positive elementary charge. The opposite is true for the the chloride ion, as it has one negative elementary charge. Since the two ions have opposing charge, they attract each other due to electromagnetic forces, and create a ionic compound (salt).
We have much more information about salts in the menu to the left. The next article is about how to determine the chemical formula for a salt.