Look at the figure above: We have a metal object that we want to plate with another metal. First we fill a "cell" (a tank, vat, or bowl) with a solution of a salt of the metal to be plated. Most of the time the salt (nickel chloride in our example) is simply dissolved in water and maybe a little acid.
In this example, the NiCl2 salt ionizes in the water into Ni++ ions and two parts of Cl- ions. A wire is attached to the object, and the other end of the wire is attached to the negative pole of a battery (with the blue wire in this picture) and the object is immersed in the cell. A rod made of nickel is connected to the positive pole of the battery with the red wire and immersed in the cell. The battery is pulling electrons away from the nickel anode (through the red wire) and pumping them over to the object to be plated (through the blue wire)
Because the object to be plated is negatively charged (by being connected to the negative pole of the battery and having electrons pumped to it), it attracts the positively charged Ni++ ions that are floating around in the solution. These Ni++ ions reach the object, and electrons flow from the object to the Ni++ ions. For each ion of Ni++, 2 electrons are required to neutralize its positive charge and "reduce" it to an atom of Ni0 metal. Thus, the amount of metal that deposits is directly proportional to the number of electrons that the battery provides.
Note: This proportional relationship is a reflection of Faraday's Law of Electrolysis. If you are advanced enough in chemistry (a high school student), that you've heard terms like gram molecular weight, mole, valence and Avagadro's number, but it's all a hodgepodge to you instead of a cohesive whole, don't despair! Study Faraday's Law for a while, which says that 96,500 coulombs of electricity will deposit one gram equivalent weight of metal, and all of these disparate wacky terms will come together in a moment of enlightenment.
Meanwhile back at the anode, electrons are being removed from the Nickel metal, "oxidizing" it to the Ni++ state. Thus the nickel anode metal dissolves as Ni++ into the solution, supplying replacement nickel for that which has been plated out, and we retain a solution of nickel chloride in the cell.
As long as the battery doesn't go dead, nickel continues to dissolve from the anode and plate out onto the cathode. As we move the electrons from the anode to the cathode, through the wires, and powered by the battery, the rest of the nickel follows, dissolving into solution at the anode, migrating through the solution, and plating out at the cathode.
Note: We picked nickel chloride in the example chiefly for simplicity of explanation. First, because nickel always dissolves in the "+2" oxidation state (Ni++), whereas many other metals like copper and zinc can dissolve in either the "+1" or "+2" state and add some confusion; secondly because chloride is a simple one-atom anion whereas many anions like sulphate or acetate are more complex. But we do not actually recommend that nickel be used for your first school science demonstration because -- while the explaining is simple -- the plating is difficult :-)
For school demonstrations, we suggest plating copper pennies with zinc, or plating quarters or brass keys with copper because both are easy and can be done without the need for any dangerous or toxic chemicals.