At the cathode:
K = K^+ + 1 e^-1 (e^-1) signifies an electron
Pb = Pb^+2 + 2 e^-1
Al = Al^+3 + 3 e ^-1
At the cathode the metal ions are being oxidized through the loss of one or more electrons.
At the anode:
Br + 1 e^-1 = Br^-1
O + 2 e^-1 = O^-2
F + 1 e^-1 = F^-1
At the anode, the non-metal ions are being reduced by the gain of one or more electrons.
These are examples of half-cell reactions. If you are doing an oxidation-reduction reaction the loss of electrons at one electrode has to equal the gain of electrons at the other electrode. The metals are reducing agents and the non-metals are oxidizing agents.
To remember this: "an oxidizing agent is reduced by the gain of electrons"