When you electrolyse an aqueous solution of $\ce{NaCl},$ the product formed at cathode is $\ce{H2}$ gas (preferential discharging), but the product formed at anode is $\ce{Cl2}$ gas. According to standard electrode potential, reduction of $\ce{Cl2}$ is 1.36 V and $\ce{O2}$ is 1.23 V.
Keeping the values in mind, $\ce{O2}$ gas should be formed at anode because it has a smaller electrode potential. But it is given that chloride ions is preferred by anode because of a phenomena called overvoltage.
I don't understand how overvoltage can effect the products of electrolysis.