Winning at Stacker comes down to hand-eye coordination, but there's a well-known trick: keep three blocks in play. If you have three blocks at the top and time it right, the machine is essentially forced to let you win. If you're down to a single block at the top, hitting it right actually makes you lose—the game is programmed that way.
The key is never to let it drop below three blocks; it won't skip a three-block stack. Get that right and you could walk away with a prize like an iPhone or iPod Touch.
If you want to practice first, try a browser version such as "Bildy Blox"—look it up and play for about 20 minutes a day. Once you feel ready, take on the real thing.