An electrode is a conductor that makes contact with a nonmetallic medium (e.g., an electrolyte). In an electric circuit, an electrode is referred to as either an anode or a cathode. Current enters a device through the anode, and leaves a device through the cathode.
If a device (e.g., an LED) is consuming power, the anode polarity is positive and the cathode is negative. If a device (e.g., a battery) is providing power, the anode is negative and the cathode is positive. In a rechargeable battery, the anode and cathode swap positions depending on whether the battery is being discharged or recharged.
By convention, current flows in the direction of positive charges. In metals, negatively charged electrons flow in the direction opposite the conventional current.
In electrochemistry, oxidation, or the loss of electrons, occurs at the anode. Reduction, or the gain of electrons, occurs at the cathode.