An acid is a substance that will dissolve in water to yield hydronium ions, H3O+. As an example, consider the equation shown here:
HCl (aq) + H2O (aq)→ Cl - (aq) + H3O+(aq)
The process represented by this equation confirms that hydrogen chloride is an acid. When dissolved in water, H3O+ ions are produced by a chemical reaction in which H+ ions are transferred from HCl molecules to H2O molecules.
When hydrogen chloride gas dissolves in water, (a) it reacts as an acid, transferring protons to water molecules to yield (b) hydronium ions (and solvated chloride ions)
A base is a substance that will dissolve in water to yield hydroxide ions, OH−. The most common bases are ionic compounds composed of alkali or alkaline earth metal cations (groups 1 and 2) combined with the hydroxide ion—for example, NaOH and Ca(OH)2. When these compounds dissolve in water, hydroxide ions are released directly into the solution. For example, KOH and Ba(OH)2 dissolve in water and dissociate completely to produce cations (K+ and Ba2+, respectively) and hydroxide ions, OH−. These bases, along with other hydroxides that completely dissociate in water, are considered strong bases.
Consider as an example the dissolution of lye (sodium hydroxide) in water:
NaOH (s) → Na+ (aq) + OH− (aq)
This equation confirms that sodium hydroxide is a base. When dissolved in water, NaOH dissociates to yield Na+ and OH− ions. This is also true for any other ionic compound containing hydroxide ions. Since the dissociation process is essentially complete when ionic compounds dissolve in water under typical conditions, NaOH and other ionic hydroxides are all classified as strong bases.
For more information and activity, do check out the Chemistry LibreTexts website.
Try out some exercises on Acids & Bases.
What are Acids & Bases?
TED Ed: Acids & Bases