[change] How the voltaic pile is made
The picture to the right shows a voltaic pile: It's a pile, or "stack" of discs, made from 3 different materials. Some of the discs are made from copper, and some are made from zinc. Other metals can be used, but it's important that there are two different kinds of metal. There are also discs made from leather or cardboard: These are the green discs in the picture. They have to be soaked, or "made wet", with something acidic.
Note how the discs follow a pattern: First a disc made from one of the metals, then a cardboard or leather disc, and then a disc made from the other kind of metal. Then the same kinds of discs, in the same order, again and again. In the picture, you can see how one "set" of a zinc disc, a cardboard disc and a copper disc has been "pushed" a little to the right. Such a "set" is called a cell: The voltaic pile in the picture has 6 cells. The two different metal discs in a cell will have a voltage across it; about 1,1 volts. Stacking cells in a pile adds the voltage of the cells: From the discs at the top and bottom of the voltaic pile in the picture, there is a voltage of 6 × 1,1 volts = 6,6 volts.
[change] How the voltaic pile works
The acid in the leather or cardboard discs will try to dissolve some of the metal in the zinc discs. To be dissolved, a zinc atom must give away 2 of its electrons. The zinc atom then becomes an ion: Ions can "go where they want to" in the liquid acid. They go through the leather/cardboard disc, and meet the copper disc. The zinc ions are "missing" the two electrons they left behind, so when they get to the copper disc, they each "steal" two electrons to replace the missing ones. When they "steal" electrons, the zinc ions turn back from ions to "normal" zinc atoms.
The end result is that the zinc disc ends up with a lot of electrons "left behind" by the zinc ions, and the copper disc ends up "missing" a lot of electrons "stolen" by the zinc ions. To use the electricity that comes from the pile, we have to connect something that uses electricity to the two discs at the top and bottom of the pile. This gives the electrons left behind in the zinc disc a "chance" to go to the copper disc. At the copper disc, the electrons "replace" those that were "stolen" from the copper by the zinc.
[change] How Volta got the idea
Luigi Galvani was an Italian, working with anatomy. Around 1786 he had seen something interesting: He had dissected (cut apart) a frog, and when he touched a frog's leg with two tools made from different metals, the leg moved even though the frog had been killed before the dissection.
Galvani himself thought this had something to do with the leg, and not with the metal tools he used. Volta saw that the tools must be made from two different metals for the leg to move. Volta also found that he could make a little bit of electricity just by making two different metals touch each other. He thought that the two different metals gave something he called contact tension, and the electricity came from that contact tension. Galvani and Volta talked a lot about this, but they never agreed.
Volta tried to make use of it all. He made experiments with (tried out) rods of different kinds of metals, in wine carafes (a kind of bottle). This way, he found that the best metals to use, are silver and zinc. He could also make it better by using flat discs instead of rods of metal. That is because the discs have more surface area than the rod; this gives more "room" for the zinc ions to leave one disc and get in touch with the other.
[change] What happened after the invention
Before the voltaic pile was invented, people could only make static electricity. With the voltaic pile, one can make electricity that keeps flowing for some time. With this kind of electricity, scientists could do a lot of "new" things. For instance, when new kinds of metal were discovered, the electricity from a voltaic pile could "sort" chemicals. This way, small but very pure bits of these "new" metals could be made.