How do the adjustment barrels on a gear cable work?
Your basic barrel adjuster is a tube with a thread on the outside of one end.  The threaded end fits into a female threaded piece, either the shifter itself or another tube.  (If you have this second type, where the female end is another tube, it's necessary to hold that second tube stationary while turning the first tube.)

The cable passes through the tube, and the cable housing "bumps into" the end of the adjuster barrel (which generally has a sort of "cup" sized to accept the housing and keep it centered).

The adjuster works this way:  As you UNSCREW the adjuster, it pushes the cable housing farther out, effectively tightening the cable.  The cable is held in tension by the spring in the derailer, so this adjustment moves the position of the far end of the cable relative to the derailer.

[Note that some adjusters have a thin "jam nut" on the threaded portion of the barrel, and this is tightened against the female piece to keep the adjuster from turning.  It's often necessary to unscrew this jam nut slightly before working the adjuster.]

Note that once you've unscrewed the adjuster beyond the end of the threads it won't tighten the cable anymore, but will just spin.  If this occurs (before satisfactory adjustment is achieved) it's necessary to screw the adjuster all the way in, loosen the cable clamp at the derailer, and pull it a hair tighter.

Also, if some jackleg in the past decided to "tighten things" with a pair of pliers they may have broken off the threaded portion inside the female portion, rendering the adjuster completely ineffective.