A cathode is the metallic electrode through which current flows out in a polarized electrical device.
Conversely, an anode is the electrode in a polarized electrical device through which current flows in from an outside circuit. Cathodes get their name from cations (positively charged ions) and anodes from anions (negatively charged ions).
In a device that uses electricity, the cathode is the negatively charged electrode. Such devices include diodes, vacuum tubes, cathode ray tubes, oscilloscopes, electrolytic cells in hydrogen production and secondary battery cells in rechargeable batteries.
However, in a device that produces power the cathode is the positive terminal, due to the flow of electrons being reversed. Such devices include galvanic cells and primary cell non-rechargeable batteries, as well as secondary battery cells (rechargeable) when the energy within the battery is being consumed.
See a video demonstration: