Answer:
A cation is formed when a metal ion loses a valence electron while an anion is formed when a non-metal gains a valence electron. They both achieve a more stable electronic configuration through this exchange.
The difference between all of them in the make-up of the R group.