Atoms consist of electrons, protons and neutrons. While the protons and neutrons are present inside the nucleus, the electrons orbit around it. Among these particles, protons are positively charged, while electrons are negatively charged and neutrons do not have a charge. Atoms have the same number of electrons and protons and hence have net 0 charge.
When an atom gains or loses an electron, it attains a net charge and becomes an ion. When electrons are lost (or donated), the resulting ion is called cation. When electrons are gained, the resulting ion is called an anion. Thus, cations have a net positive charge, while anions have a net negative charge.
For example, sodium and chlorine are atoms. A sodium atom loses an electron to form a sodium cation (Na+). A chlorine atom, on the other hand, gains an electron and forms a chloride anion (Cl-).
Hope this helps.