In acidic conditions, there is an abundance of H+ ions, so the amino acid acts as a base and accepts as many H+ ions as possible.
In alkaline conditions, there is a deficiency of H+ ions, so the amino acid acts as an acid and donates as many H+ ions as possible.