The theory is that gophers like quiet, still gardens. Whirl-a-gigs send vibrations down into the ground as the blades turn. The rodents can't stand it and leave.
I have two in my garden. I made them both out of scrap material. I cut coffee cans into propellers by using tin snips to cut three blades down the sides, bending them outwards, and punching a nail in the center of the can's bottom. I twisted the blades into about a 30 degree angle. Hammer the nail into the nose of a stick, leaving room for the blade to rotate. Hold it up and blow on it. It should turn freely. Attach a tail fin. I used another coffee can, cut open and smoothed out, to nail onto it. Balance the assembly on your finger tip to find the balance point. I use a power drill and a 3/16 bit to get a nice straight hole. Then put a nail through it to your post. It should track the wind easily and turn in a breeze. The more noises, squeeks, and rattles, the better. Feel the post to check the vibrations it sends down into the ground. Each whirl-a-gig is different, with it's own noises and personality.
This simple design will work for a few months, but constant motion will eventually make it crack up. I improved it after every repair. First, I added washers to every axis. Then I used a bolt for the propeller shaft as the nails kept getting sawed through by the coffee can blade assembly. Then I used a steel vegetable can instead of an aluminum coffee can for the blades.
No gophers have entered my garden since I installed these, although they have several mounds nearby.