If two boats are on the same tack, then the boat to windward gives way to the boat to leeward (pronounced ‘loo’ard’). Here’s how it works:
Windward and leeward

The windward boat is toward the direction that the wind is coming from. The leeward boat is away from the direction that the wind is blowing from.
First example

Both boats are on the starboard tack: theĀ windward boat must keep clear.
Once again, the right of way boat hails and the windward boat responds by altering course.
Second example

These boats are on the same tack but very different courses: As before the windward boat must keep clear of the leeward boat.
That was rule 11 of the Racing Rules of Sailing.