An ion is formed when an atom losses or gains electrons.
Ions are of two types - cation(positive ion) and anion(negative ion)
The negatively charged ion or the anion is formed by accepting or gaining electrons. For example - ion is formed when a chlorine atom accepts one electron from another atom.