Nitrogen, located in group 15 of the periodic table, typically gains electrons to achieve a stable electron configuration. Nitrogen has five valence electrons, and it needs three more to complete its octet. Therefore, it tends to gain three electrons.
When nitrogen gains three electrons, it forms an ion with a charge of -3. This is because the addition of three negatively charged electrons results in a net negative charge. The ion formed is called the nitride ion, represented as N3-.
In summary, nitrogen gains electrons to form an ion with a -3 charge.