Salts are ionic compounds formed when an acid reacts with a base, typically producing salt and water.