How To: Hopping in Place
Hopping in place is handy for keeping your balance on off-camber things like rocks. You try to maintain your balance, but when you start to lose it, you hop to correct your balance. However, you still want to take the time to learn to track stand properly, hopping in place is much more energy draining.
With both brakes locked compress your body, and jump up.
You'll want to pull up your rear wheel and pull on the bars with your arms at the same time. This should result in both wheels coming off the ground slightly.
Try to learn to control your landing and keep your balance.
Once you've got hopping in place down, try hopping up stairs:
Put your front wheel one or two stairs up, and lean your body the direction you want to go, and hop. Hopefully you'll get your rear tire up one stair, and your front tire will go up one more stair, too... Trying going down the same way. Stairs are awesome for doing weird stuff like this, and they're very safe compared to rocks. You may find hopping up stairs easier at an angle.
Hopping in place is another way of keeping your balance when trackstanding isn't an option is pivoting. Keeping both brakes locked you make little pivots on either your front or rear wheel (you've gotta figure out which in what circumstances yourself) when you lose your balance. I generally try to pivot on my rear as much as possible, since it requires less energy than moving the rear around. This is also handy for inching your way over to the edge of something to drop off, or orienting yourself right to do a big move like a sidehop, or getting your aim right and your balance set before you do a pedal-up or whatever.