This tool was actually invented by the Spaniard colonists in Mexico around the 1700's to assist with the preparation of a hot chocolate like drink. The chocolate that was made by the Aztecs was simply roasted beans, ground on a metate and with some seeds and flavorings. The resulting chocolate was thick, grainy, and had a nasty habit of separating. That is why the Aztecs would keep pouring the mixture from one pot to another; to keep the chocolate mixed. Today, chocolate includes emulsifiers that keep the chocolate from separating.
The Spaniards thought the whole business of all that pouring back and forth was quite uncivilized; thus the invention of the molinillo (stirrer). Earliest versions had a simple ball or square at one end of a long handle. Later they got more elaborate with rings and movable parts that helped the stirring process. The molinillos were made to fit into a container with the handle extending out of the top. The molinillo was then rotated between the users two hands placed palm-sides together. The twisting motion frothed the chocolate. Later specialized pots would be invented to hold the molinillo.
The photograph above is a nice example of a chocolate pot design that dates back to Louis XVIII still made today in France by the Pillivuyt Company. The chocolate ingredients are placed in the pot. The "molinillo" (called moulinet in France or a moussoir which means froth-maker) is placed in the pot and then the cover is placed over the handle of the molinillo. With the cover in place, the user holds the molinillo between his two hands and with a rubbing motion froths the liquid. The pot is held from the top and side handle to pour the chocolate into cups.
The Texas State Libary and archives commission brings us the Molinillo Chocolate Song. "Children in Mexico often drink chocolate with breakfast. They stir it with a special utensil called a molinillo which is held between the palms and rotated back and forth. During the chorus of this rhyme, children rub their palms together and pretend to "stir" the chocolate with a molinillo."