How Electrolysers work
The process by which we generate hydrogen (and oxygen) from water is called electrolysis. The word "lysis" means to dissolve or break apart, so the word "electrolysis" literally means to break something apart (in this case water) using electricity.
A simple electrolyser normally consists of an anode and cathode inside a container. An example of this is illustrated in the picture below.
An electrical power source is connected to the two electrodes, or two plates (typically made from some inert metal such as platinum or stainless steel) which are placed in the water. In a properly designed cell, hydrogen will appear at the cathode (the negatively charged electrode, where electrons enter the water), and oxygen will appear at the anode (the positively charged electrode). Many industrial electrolysis cells are very similar to Hofmann voltameters, with complex platinum plates or honeycombs as electrodes.
Currently the electrolytic process is rarely used in industrial applications since hydrogen can be produced more affordably from fossil fuels. However, recent developments by a number of companies have significantly reduced the cost of hydrogen production through electrolysis.
Generally the only time hydrogen is intentionally produced from electrolysis is for specific point of use application such as is the case with oxyhydrogen torches or when extremely high hydrogen purity or oxygen is desired. The vast majority of hydrogen is produced from hydrocarbons and as a result contains trace amounts of carbon monoxide among other impurities. The carbon monoxide impurity can be detrimental to various systems including many fuel cells.