Redox and cell potential
Oxidation is loss of electrons at the anode, reduction is gain of electrons at the cathode, and the standard cell potential is calculated as cathode minus anode.
A worked example
Cell notation reads left to right as the physical setup: anode | anode solution || cathode solution | cathode. In Zn(s) | Zn2+(aq) || Cu2+(aq) | Cu(s), the single line after Zn(s) marks where solid meets solution at the anode, where oxidation happens (Zn -> Zn2+ + 2e-). The double line represents the salt bridge, and the single line before Cu(s) marks where solution meets solid at the cathode, where reduction happens (Cu2+ + 2e- -> Cu). The metal written on the left is always the anode.
The mistake people actually make
A voltaic cell generates current from a spontaneous redox reaction (E°cell > 0), whereas an electrolytic cell forces a non-spontaneous one with an outside power source. The electrode rules stay the same, with oxidation at the anode and reduction at the cathode. What flips between the two is which electrode is positive, and that is the most common mix-up on this topic on the diploma exam.