A neutral atom has equal numbers of protons and electrons, so the positive and negative charges cancel. An atom can lose one or more of its outer electrons. The outer electrons are the furthest from the nucleus, so they are held least tightly and are the easiest to remove.
This can happen when the atom absorbs enough energy, for example from electromagnetic radiation. The electron gains enough energy to escape from the atom altogether.
When an electron is lost, the atom has lost a negative charge but still has the same number of protons. There are now more protons than electrons, so the atom has an overall positive charge. An atom that has become charged like this is called an ion. Losing one electron gives a charge of +1, and losing two electrons gives a charge of +2.