Salts are formed through ionic bonding, which can only occur between a cation and an anion.
The neutralisation reaction is an excellent example of how salts are formed, as it involves the transferral of electrons between acids and bases to form a salt and water.