A substance is an acid if it furnishes H+ ions in its aqueous solution and a base if it furnishes OH– ions. Water plays very important role in these processes.
If a dry strip of blue litmus paper is brought near the mouth of the test tube containing dry HCl gas, its colour does not changes. When it is moistened with a drop of water and again brought near the mouth of the test tube, its colour turns red. It shows that there are no H+ ion in dry HCl gas. Only when it dissolves in water, H+ ions are formed and it shows its acidic nature by turning the colour of the blue litmus paper to red.
A similar behavior is exhibited by bases. If you take a pallet of dry NaOH in dry atmosphere and quickly bring a dry strip of red litmus paper in its contact, no colour change is observed. NaOH is a hygroscopic compound and soon absorbs moisture from air and becomes wet. When this happens, the colour of the red litmus paper immediately changes to blue. Thus in dry solid NaOH although OH– ions are present but they are not free and do not show basic nature on coming in contact with water, OH– ions becomes free and show the basic nature by changing red litmus blue.
Acidic and basic characters of different substances can be observed only when they are dissolved in water.
When an acid like sulphuric acid or a base like sodium hydroxide is dissolved in water, the solution that is formed is hotter. It shows that the dissolution process is exothermic. A part of the thermal energy which is released during the dissolution process is used up in overcoming the forces holding the hydrogen atom or hydroxyl group in the molecule of the acid or the base in breaking the chemical bond holding them and results in the formation of free H+(aq) and OH– (aq) ions.
Many bases are ionic compounds and consist of ions even in the solid state. For example sodium hydroxide consists of Na+ and OH– ion. These ions are held very tightly due to the strong electrostatic forces between the oppositely charged ions. Presence of water as a medium (solvent) weakens these forces greatly and the ions become free to dissolve in water.