Practice braking! With practice you'll get to know when you're about to start skidding and you'll be able to reduce the pressure on the brake levers. Ultimate stopping technique goes like this:
- Get in a low position (if you can - the bike might limit how low you can get).
- As you increase pressure on the brakes shift you backwards trying to keep you weight in your feet.
- Drop your heels to drive your weight into the pedals. Brake as hard as you can without skidding.
- As you come of the brakes gradually move your weight forwards.
In terms of components you're tyres are the most important factor in how quickly you stop - wide spaced knobs are good for stopping and softer compounds are better as well. Lowering pressure will improve stopping distance as well. The problem is that tyres that stop well won't roll as quickly.