One basic thing to know about an atom is that it is made of three main components- protons, neutrons, and electrons.
The charge for an atom can come from two sources: positively charged protons in its nucleus and negatively charged electrons outside the nucleus. So, the atom is considered neutral when there is a balance between the positively charged protons and negatively charged electrons. Like, how a sum of +1 and -1 charge gives a zero.
This part is important because the ordinary, invisible atom that makes up literally everything is mainly neutral in charge.
So, in a negatively charged atom, the charge must come from an excess of negative electrons.
Now, how and when can an atom accept new electrons?
An atom can accept new electrons only if it has space and need.
The electrons are accommodated in regions called shells around an atom's nucleus. So, if an atom has space or shells, it will accept the electrons. This information about an atom is obtained from its quantum number.
Next is an atom's need to accept the electrons. It will only pick those many electrons until it reaches number 8 in its outermost shell, which is a stable state known as the octet state. So, there is a cut-off on the number of maximum electrons an atom can pick. The exception is the first shell which can have a maximum of only 2 electrons.
So, once a neutral atom picks an electron, the balance between the proton and electron changes. Post the electron acquisition; there will be more electrons than protons, so the charge of an atom shifts from neutral to negative.
Such a change is represented in the superscript next to the atom's symbol. The superscript mentions by what number the atom has an electron excess and its charge.
A few examples are chloride Cl-, bromide Br-, and oxide O2-. These atoms had the space to accept one and two electrons. Also, they attained stable octet numbers in the outermost shell post-acquisition.
In chemistry, such negatively charged atoms are called anions, and the non-metals form the most common anions. These anions commonly form ionic bonds in chemistry.