One of the simplest ways to collect gas in the laboratory is by water displacement. You take a bottle filled with water, turn it upside down in a pan of water, and then connect your reaction vessel to it via some type of tubing. You seal your reaction vessel with a stopper fitted with an outlet tube which then run under and into the collecting vessel that is filled with water. As the gas is produced, it travels through the tube and into the collecting vessel where it displaces the water. When the water is displaced, you simply cap the collecting jar, and you have your gas. Of course, it won't be pure because it will also contain water vapor.
In your particular experiment, you have Zn(s) + 2HCl(aq) ==>ZnCl2(aq) + H2(g) and the H2 gas will be collected by water displacement.