The following is a brief explanation of how an upright piano works
When a key is depressed slowly, it rocks on the center rail and goes up in back. The key raises the sticker and whippen. The whippen pushes the jack, which pushes the hammer butt. The hammer butt pivots on its flange and moves the hammer toward the string. When the key is half way down, the spoon engages with the damper lever, lifting the damper off the strings. When the hammer is almost to the strings, the jack heel bumps into the regulating button, and as the whippen keeps going up, the jack pivots and slips out from under the hammer butt. The hammer continues under its own inertia to the string, instantly rebounding.
At this point the strings start vibrating, the vibrations are carried to the bridge which transmits the vibration to the soundboard (the large, thin wood piece you can see in the back of the piano) which amplifies the sound (like a big speaker).
The catcher is caught by the backcheck and held in this position as long as the key is depressed.
When the key is released, the whipen drops, the backcheck releases the catcher, the briddle tape gives a little tug on the hammer butt, and with the help of the butt spring, the hammer returns to the hammer rail. The damper spring returns the damper to the strings, and the jack spring returns the jack under the butt, ready for the next repetition. This entire sequence occurs in a fraction of a second, allowing the pianist to repeat notes rapidly.
Taken from the book Piano Servicing, Tuning, and Rebuilding: by Arthur Reblitz
Watch this fascinating video ... How a Piano Is Made
Shows how a Mason & Hamlin grand piano is built.