Atoms in their natural state have a one to one ration between the positive charges of the protons and the negative charges of the electrons. The only way to create an ion, which is a positively or negatively charged atom, is to either add an electron or lose an electron. If you add an electron, as is the case with chlorine, you upset the balance between the positive and negative charges. There are 18 electrons and 17 protons, so the chlorine atom has become a charged chlorine ion with a charge of negative one (-1). To illustrate this, let us consider the formation of salt, sodium chloride, from a sodium atom and a chlorine atom.
Sodium has one electron in its outer energy level, it will willingly give this electron up to any takers. When it does, the sodium atom becomes a sodium ion with a charge of positive one (+1). Chlorine, as mentioned above, desperately wants an electron so it can fill its outer electron level. When it takes on that extra electron, it becomes a chlorine ion, with a charge of negative one (-1). The positive and the negative go together just like opposite ends of magnets, a north pole to a south pole, and create a very strong ionic bond between the sodium and the chlorine.