Hydrogen is a colourless gas with no smell, so you cannot identify it just by looking at it. Chemists use a simple test instead. Collect the gas in a test tube, then hold a burning splint at the open end of the tube.
If the gas is hydrogen, it burns rapidly and makes a squeaky pop sound. The pop is the hydrogen reacting with oxygen in the air very quickly. The test is often used to show that hydrogen is made when a metal reacts with an acid.
Remember that the splint must be burning. A glowing splint that is only smouldering is used for a different gas, oxygen.