Out at sea, collision risk is checked by ascertaining whether or not the vessel in question is maintaining a steady bearing relative to you. Initially, this is spotted by keeping your head still and seeing whether a distant ship remains in place over a particular stanchion, shroud, or other likely item. If it looks like a possibility, but you are uncertain, you will take the ship’s compass bearing, and keep checking as range closes.
You might even use the electronic bearing line on your radar. In confined waters, it is more convenient to note whether or not the other craft appears steady relative to its background. While difficult to prove mathematically, this old rule of thumb works every time unless the other craft is almost on the beach. If the other vessel stays in front of the same far-off field, chimney or parked car as you approach, you are on a collision heading, so watch out!