Part B of the Collision Regulations (or Colregs) is divided into three Sections. The first section deals with rules in all conditions of visibility, whether normal or restricted (by fog, rain or any other reason)
Rule 5 covers lookouts, a commonsense precaution that is often neglected- basically, this is ‘keeping an eye out for other ships and dangers’. The lookout(s) must be able to hear as well as see other ships and dangers. (‘hear’ includes listening to their foghorn, by which ships alert each other of their intentions at sea, using basic morse code in a manner also prescribed by the Colregs.) Note that a lookout is required at all times, even at anchor.
Just like your cars on the road, a critical rule requires a ship to maintain safe speed at all times. This can vary depending on circumstances, eg busy shipping lanes, poor visibility, other hazards etc.
Some sea rules of the road cover the proper use and interpretation of radar and the determining of a risk of collision (will the ship I am seeing collide with me or pass dangerously close?).
Other logical rules include the requirement that if some action is required of you, such as a change of course or speed, it should be made soon to be effective, and large enough to be obvious to the other vessel. A change of course is usually more obvious than a change of speed, but the give way vessel must slow down if required for safety.
Another rule requires a ship to stay on the right (starboard) side of a narrow waterway- the equivalent of driving on the right side of a road on land.