Water is unique in its ability to act as both an acid and a base. In pure water,one $H_2O$ molecule donates a proton and acts as an acid,while another accepts a proton and acts as a base. The following equilibrium exists:
$H_2O_{(l)} + H_2O_{(l)} \rightleftharpoons H_3O^{+}_{(aq)} + OH^{-}_{(aq)}$
The equilibrium constant $K$ is given by:
$K = \frac{[H_3O^{+}][OH^{-}]}{[H_2O]^2}$
Since the concentration of water $[H_2O]$ is constant,it is incorporated into the equilibrium constant to define a new constant,$K_w$,known as the ionic product of water:
$K_w = K[H_2O]^2 = [H_3O^{+}][OH^{-}]$
At $298 \ K$,the concentration of $H_3O^{+}$ and $OH^{-}$ is $1.0 \times 10^{-7} \ M$. Therefore:
$K_w = (1.0 \times 10^{-7})(1.0 \times 10^{-7}) = 1.0 \times 10^{-14} \ M^2$