Electrolysis uses electrical energy from an external DC source to drive a non-spontaneous reaction — typically decomposing a stable compound into its elements — inside a device called an electrolytic cell. Electrolysing molten NaCl illustrates the pattern: Na⁺ ions migrate to the cathode and are reduced to Na(l) (Eo=−2.71 V), while Cl⁻ ions migrate to the anode and are oxidised to Cl2(g) (Eo=−1.36 V), giving an overall Eo=−4.07 V — confirming the reaction is non-spontaneous, exactly as expected, so a voltage greater than 4.07 V must be supplied. Oxidation still occurs at the anode and reduction at the cathode as in a galvanic cell, but the electrode SIGNS reverse: the cathode is negative and the anode positive, because the external supply is forcing electrons in rather than the reaction pushing them out.
Faraday's two laws quantify exactly how much product electrolysis yields. The first law states mass liberated is proportional to charge passed: m=ZIt, where the electrochemical equivalent Z=n×96500molar mass is the mass deposited by exactly one coulomb. The second law compares different cells: when the identical charge passes through several different electrolytes (e.g. connected in series), the masses liberated are proportional to their electrochemical equivalents, Z1m1=Z2m2=Z3m3 — letting one substance's deposited mass be calculated from another's without ever needing the current or time directly. Together, m=ZIt and the second-law ratio are the two working equations behind essentially every Faraday's-law numerical, from simple single-cell deposition problems to multi-cell comparisons and the number of electrons or faradays a redox change like MnO4−→Mn2+ requires.