An organ grinder is the operator of a hand-cranked street instrument that became popular in the eighteenth and nineteenth centuries. The small hand-cranked table organ was originally designed to teach song birds how to sing pretty songs. These bird organs were called serinettes in French.
Serinettes contained all the basic elements of the modern street organ - bellows, pipes, and a way of making the pipes sound at the right time, which in this case was a barrel with little pins sticking out of it. These pins would hit keys which in turn would open valves which let air go to the pipes.
The serinette was soon adopted by wandering troubadours and other buskers. The only problem with serinettes was that they produced a very small, bird-like sound. As performers demanded a fuller sound, organs were built with larger pipes and bellows, and interchangeable barrels. Thus the instruments we would recognize as barrel organs were developed.