There are two common ways of shifting found in FIRST robots, one is dog shifting -- where you move a metal dog (it looks like a metal cylinder that has been cut out to have 2, 3, or more fingers or protrusions) to transfer power from the gear to the wheel. A good example would be the AndyMark shifters.
The second common way is mesh shifting (like noted above) where instead of moving a dog, you move a cluster of gears.
this is a good example, it's team 254's gearbox from 2004. The second gear cluster from the left is the one that moves to shift gears.
There are other ways like team 222's ballshifting method, or using a CVT (continously variable transmission, commonly found on today's hybrid cars), or even by physically changing the size of the wheel, like what 986 (or was it 980?) did in 2003:
click
You could make a FIRST shifting transmission "automatic" by having the programming shift gears, rather than the operators.
Also, yep, you need a source of physical energy to shift the gears -- most teams use pneumatics, others use motors or even servos.
Hope this helps