Even though you are most likely the "stand on" vessel forget colregs. "might has right".
If you're crossing at 90 degrees steer for the stern of the ship. It will pass in front of you.
If your heading straight on make a 90 degree turn until you are far enough to the "side" of its heading so you are able to resume your course.
If its coming from behind, do the same as above, make a 90 degree turn until your are to the side of its heading. Then resume your course.
All this is fine in the open sea. But be aware that he may make course changes closer to
ports. Think ahead about any nearby
ports, he may be going to, and the subsequent course changes he may need. Then you should be able to predict his course and adjust your
helm accordingly.
We thought we were getting "chased" by a large freighter early one morning off a larger
Queensland island. It wasn't until later we realized he was simply adjusting his course to
head into a nearby port. Had we been a bit more awake we would have realized this and headed
seaward instead of toward land, which subsequently left us in his course for some time.
The trick is to make definable course changes. If you zigzag your way into a collision zone, you will only confuse the helmsman on the other vessel. By making a large course change, he knows you are getting out of the way and knows he can stay on course without trying to maneuver 40000 tons at close quarters.
One last thing don't always expect them to see you anyway.
Cheers
Oz