Atoms are comprised of protons, neutrons and electrons. Protons carry a positive charge, neutrons carry a neutral charge and the electrons, a negative charge. The electrons form an outer ring around the nucleus of the atom. Positive and negative ions of certain elements can be created depending on the number of electrons in their structure.
Ionization energy breaks the bonds between the electrons and the protons in the atom. Certain metals and gases often have eight electrons in a ring around the nucleus of the atom. Elements with more or less than eight electrons have weaker or stronger bonds which ionization energy can affect.
Positive ionization occurs when a gas or metal loses an electron. For example, the element sodium has an atomic number of eleven, with 11 protons and 11 electrons. It has one electron present in its outer ring. This one electron does not have strong bonds compared with the other electrons in the atom. Therefore, ionization energy can pull this electron away from the atom, resulting in a loss of one negative charge, which creates a positive ion.
If an element pulls away an electron from another atom, it gains an electron, which is a negative charge. Therefore, the element becomes a negative ion. For example, the gas fluorine has seven electrons in its outer ring. If ionization energy pulls away an electron from another atom, it will complete its outer ring of eight electrons, but gain a negative charge.