At a mark, if two boats are overlapped when the leading boat reaches a point three (changed from 2 in 2009 rules revision) boat's lengths from the buoy, then the outside boat must give the inside boat room to round the mark.
(Definition: Overlap: if a line drawn at right angles through the aft-most part of the leading boat intersects the following boat at any point the boats are said to be overlapped.) Here's how it works:
Water at the mark!
This pair of boats are reaching towards a buoy: when the leading boat is 3 boat's lengths from the buoy, they are overlapped and the inside boat calls for water. The outside boat complies by allowing enough room for the inside boat to round the mark.
This time, the inside boat doesn't get an overlap: the leader hails 'no water' and the trailing boat has to tuck in astern to round the mark.
(Hint: you can see from these two animations how much difference getting that overlap made: sailors will work hard to get or defend that inside berth.)
Things to note:
1. This rule only applies when boats are on the same tack: if they approach the buoy on opposite tacks the port and starboard rule applies (beating to windward) or 'or when the proper course for one of them, but not both, to round or pass the mark or obstruction is to tack*'. (rule 18.1)
2. This rule doesn't apply to start lines: You can't call for water on a start line buoy or the committee boat! (rule 18.1)
3. If it's doubtful whether the overlap exists, the assumption is that it doesn't. (rule 18.2(e))
* A reader asks: "What does that mean, then?" I don't have a clue. I can't envisage that situation. If the rule had said 'gybe' instead of 'tack' it would have made a lot more sense to me!