In a port starboard situation, the starboard boat has the right of way. The starboard boat should hail "starboard" to the port tack boat when it's clear the boats are on a collision course. The port tack boat should respond "tack or cross" or "hold your course" if she decides to duck the starboard tack boat. It's important that the port tack boat does everything in her power to avoid a collision.
A Leeward boat has right of way over a windward boat. The leeward boat should hail "leeward" to the windward boat if the boats are on a collision course. If there are several boats to windward, the leeward most boat has rights over all of the windward boats and the next windward boat has rights over all the boats to windward of her but does not have rights on the boat to leeward.
A boat that is clear astern must avoid a boat that is clear ahead. The boat that is clear astern must do everything in her power to avoid a collision.
Summary of the Basic Racing Rules of Sailing
The goal of the Racing Rules of sailing is to prevent collisions. It's important that even when in a right of way position you do your best to avoid a collision. Sometimes a port tack boat might not see a starboard boat, so it's important to hail other boats to let them know that you're in a right of way position. The give way boat should hail back the right of way boat to make her intentions clear. These basic rules apply to boats that are not racing as well. They are internationally recognized.