That is only half correct. It is depending of the process. The electrolyte, the material the electrode are made from., current density,etc.
If you do an electrolysis of slight acidic or alcaline water with platinum electrodes then the cation H+ will be reduced to H2 and the anion hydroxide will we oxidised to oxygen.
If you use hydrochloric solution and use copper electrodes, then at the cathode the hydrogen will be developed but the Anode do a reaction with the chloride and copper will be dissolved.
If you do an electrolysis of a sulfate solution then you can develop oxygen at Anode, but also with special electrode and high current density an oxidation of sulfate to caroate or peroxodisulfates.