Each tournament differs a little but typically weight categories are usually about 15 pounds.
Competitors begin standing on an open, padded mat surface. Blue belt matches are typically 4 to 6 minutes long; higher ranks may be longer. Straight ankle and knee locks are usually allowed, but twisting ones are not.
Any submission (tap out by competitor) ends the match with a winner. If time expires and no submission has occurred, then the competitor who has earned the most points wins. If time has expired and points are even, then it is a referee's decision, based on typical elements such as aggressiveness, control of the fight, minor progress, etc. Techniques which earn points are:
2 points. Takedown from standing
2 points. Knee-on-stomach position
2 points. Scissor, sweep, or flip, using legs (from bottom position to top)
3 points. Passing the guard
4 points. Mount
4 points. Mount on back (with leg hooks in)
Note in particular that no points are given for reversals, e.g. escaping from the bottom of the mount. Also, not all tournaments award points for sweeps, but as I mentioned already, it depends on the tournament.