I forgot this one, but I learned this in physics class. It had something to do with there being more or less electrons for how ever many photons there is in an atom.
Example: Hydrogen has 1 photon which usually means there is one electron, but when there is more electrons than photons, that is a negative ion. When there's less electrons than photons, that is a positive ion.
hope this helps