The concept of reversing the direction of the spontaneous reaction in a galvanic cell through the input of electricity is at the heart of the idea of electrolysis. See for a comparison of galvanic and electrolytic cells. If you would like to review your knowledge of galvanic cells (which I strongly suggest) before learning about electrolytic cells.
Electrolytic cells, like galvanic cells, are composed of two half-cells--one is a reduction half-cell, the other is an oxidation half-cell. Though the direction of electron flow in electrolytic cells may be reversed from the direction of spontaneous electron flow in galvanic cells, the definition of both cathode and anode remain the same--reduction takes place at the cathode and oxidation occurs at the anode.