If you pick up a cheap "training wheels" bike, you will feel less anxious about practicing extreem braking and colision avoidance. Once you are done with it, you can always resell it and recover at least most of your money.
Apply the front brake slightly ahead of the rear brake. The reason for this is weight transfer. At the brakes are applied, the weight of the bike and rider tends to rotate around the center of gravity so thet the front of the bike gets heavier. If you hit the rear brake first and apply it to a point just short of lockup, the rear will get lighter when the front brake is applied and the rear wheel may then lock.
Riding straight ahead on flat, level, dry ground, try applying the front brake progressively harder. At the instant it locks, LET GO! While doing this, concentrate on the sound and feel of the bike and try to learn the warning signs that occure before lockup. Then do the same with the rear brake.
The things to keep in mind are that a locked wheel does not steer well, it won't stop nearly as well as one that is near lock but still turning, and locking a wheel takes away all the wonderful gyroscopic effects that make a motorcycle stay up without help.
Yes, in the movies, they use the strange effects of momentarily locked wheels to do all sorts of wonderful things. Don't try this on a bike you care about. Those guys have crashed hundreds, maybe thousands of times learning how to do that.