To understand the rules of the road as they pertain to sailboats, you must know a little more sailing terminology.
When sailboats approach one another under sail, the "give-way" boat must stay clear of the "stand-on" boat. The following rules determine which boat is the "give-way" and must yield the right-of-way in any situation where the danger of collision exists.
If the boats are on opposite tacks, the boat on the port tack gives-way to the boat on the starboard tack.
If the boats are on the same tack, the boat to windward must keep out of the way of the boat to leeward. In other words the boat farthest from the direction from which the wind is blowing has the right-of-way.
Generally, sailboats have the right-of-way over power boats unless the sailboat is overtaking another boat. In that case, the sailboat becomes the "give-way" boat. Additionally, if a sailboat has mechanical propulsion and it is being used the sailboat, even while still under sail, is suddenly a power boat and must obey the same rules as other power boats.
Even though a sailboat may have the right of way over a power boat, some common sense must be used. For instance, you should not impede the passage of large power boats and you should not change course when approaching power boats. Changing course only makes it harder for the power boat to pass safely.