The International Regulations for Preventing Collisions at Sea (IRPCS) is a convention and a set of rules which govern how vessels should behave and navigate at sea concentrating on how they should navigate to avoid collisions. They cover such things as which side of a narrow channel vessels should travel on (the right hand side), who should give way when 2 vessels are on a collision course, rules about which lights to use in the dark, and sound signals in fog, and the technical specifications of these lights and sounds. They are set by the International Marine Organisation which is based in London.
The rules apply to vessels which are registered to any country which has signed up to them. When a country signs up to the IRPCS the rules become a binding part of the Law code of that country and therefore carry the weight of criminal law. They therefore also apply automatically in the tidal territorial waters of any signatory country. They do not necessarally, but often do with additional rules, apply to inland waters of a signatory country. Many rules for inland waters are based on the IRPCS.