The precursor to all the developments in mechanical pianos was called the pianista. It was invented by Fourneaux in 1863, and displayed at the Philadelphia Exposition in 1876. The pianista was placed in front of an ordinary piano and a hand crank produced a vacuum that worked the “fingers” set onto the keyboard.
Two types of mechanical piano evolved from Fourneaux’s invention. The first type, the “piano player” or “pianola,” was an instrument placed in front of a normal piano, with felt-tipped fingers resting on the keyboard. Music was played from paper music rolls and powered by foot bellows. These were popular from about 1900 to 1905. They began to lose favour because the instrument was an inconvenient and cumbersome piece of furniture.
The second type of mechanical piano that replaced the pianola, the “player piano,” had all of the self-playing features built right into the piano. It was more desirable to consumers because it was less cumbersome than the pianola and could still function as a regular piano. The first of these player pianos was being produced in the 1880s.
Mechanical pianos fell into decline by the late 1920s with the development and spread of broadcasting and electric recording.
Inside a Mechanical Piano
Watch this video from MIT that shows the "guts" of a mechanical piano being played.