Answer
Water accepts a proton from HCl to act as a base. And donates a proton to $NH_3$, to act as an acid.
Work Step by Step
Any species that donates a proton is acid and that accepts a proton is a base. Water with $NH_3$ donates a proton so is an acid. With HCl, it accepts a proton so it acts as a base.