This is the basic rule when two sailing boats meet: no matter what other rules exist, if the boats are on different tacks, then the boat on port tack gives way to the boat on starboard tack. Here’s how it works:
Port Tack

A boat is on the port tack when the boom is out to starboard. This boat is sailing to windward on the port tack
Starboard Tack

A boat is on the starboard tack when the boom is out to port. This boat is sailing to windward on the starboard tack

 

Port tack gives way

Here boats meet on opposite tacks: The starboard tack boat hails “Starboard!” (a good idea: he doesn’t have to, but it alerts the other crew) and the port tack boat gives way by tacking.

 

Here two boats meet on opposite tacks, but this time the port tack boat decides to give way by passing astern of the starboard tack boat. Which of these tactics is best? There are lots of factors to consider: only experience will help you make the right choice!
That was rule 10 of the Racing Rules of Sailing.

 

Acknowledgement!
This article about the racing rules was inspired by an article on Burghfield SC’s website (I always love nicking other people’s ideas!).
I hope you don’t mind me nicking yours.