When a metal oxide reacts with an acid, the metal cation donates electrons to the acid, forming a salt and water. For example, when sodium oxide reacts with hydrochloric acid, the following reaction occurs:
$$Na_2O + 2HCl → 2NaCl + H_2O$$
When a metal oxide reacts with a base, the oxide anion accepts electrons from the base, forming a salt and water. For example, when sodium oxide reacts with sodium hydroxide, the following reaction occurs:
$$Na_2O + H_2O → 2NaOH$$
The amphoteric nature of metal oxides is important in many industrial processes. For example, metal oxides are used as catalysts in a variety of reactions. They are also used as pigments in paints and ceramics.