A barrel organ plays music by using turning a barrel, with notes decided by an arrangement of pins. It is very similar to a simple music box where the pins pluck a metal harp. With a barrel organ, the pins in the barrel lift "keys" that open valves that let air from the bellows to play the pipes.
A small barrel organ
The barrel organ is sometimes wrongly called a hurdy gurdy, which is a string instrument. Barrel organs come in many different sizes from hand carried ones to large sizes carried on a wagon or trailer. Usually each barrel had a number of tunes on it, and the tune could be changed to different selection by lifting an indexing pin and sliding the barrel to the next index position. Even a small hand carried organ could play six or eight tunes. Stationary barrel organs, built into large houses or churches, were larger pipe organs, and could play longer, and more serious music. Some had different barrels or revolving barrel changers, which meant they did not need an organist to play them, and had a larger selection of music. Organs built in a church, allowed people to sing, accompanied by organ. Some of the only organ music composed by Mozart, was supposedly written for a barrel organ built into a clock.
Media related to Barrel organs at Wikimedia Commons