When it can act as a Bronsted acid (donates a proton) or a Bronsted base (accepts a proton)
amphiprotic substances are ions or molecules that can behave as a Bronsted acid or base.
water is acting as an acid as it donates a proton to ammonia
#H_2O_"(l)" + NH_(3 "(aq)") rarr OH^(-)._"(aq)" + NH_4^+._("(aq)")#
Water is acting as a base when it accepts a proton from hydrochloric acid.
#H_2O + HCl rarr H_3O^+ + Cl^-#
Another example of an amphiprotic substance is dihydrogen phosphate,