Entry 1 The general hierarchy
As a rough hierarchy, vessels with less maneuverability generally hold right of way over more maneuverable ones — a sailing vessel under sail typically has right of way over a powered vessel, and a vessel restricted in its ability to maneuver outranks both.
Entry 2 Crossing situations specifically
When two powered vessels are on a crossing course, the vessel that has the other on its own right (starboard) side is generally the one that must give way, while the other vessel is expected to hold its course and speed so the giving-way vessel can predict where it will be.
Entry 3 Right of way is not a guarantee
Having right of way does not remove the obligation to act to avoid a collision if the other vessel clearly isn't yielding. Rules describe who should normally give way, not a license to hold course regardless of what is actually happening.
Entry 4 Questions people ask
Does a sailboat always have right of way over a powerboat?
Generally when under sail, yes, but a sailboat under engine power is treated as a powered vessel for right-of-way purposes.
What should I do if the other vessel isn't giving way as expected?
Slow down, change course early, and communicate if possible — rules of the road are a guide to normal behavior, not a reason to assume another vessel will comply.