According the Bronsted-Lowry theorya substance as an acid if it acts as a proton donor, and as a base if it acts as a proton acceptor.
When hydrogen chloride gas dissolves in water to produce hydrochloric acid, the hydrogen chloride molecule gives a proton (a hydrogen ion) to a water molecule.
As a result of this process the Hydronium Ion is formed.