Shadowing a ship or convoy is as tricky in the game as in real life I would suppose.
There are two general strategies that I use:
1. Constant observation - This is where I try to position my sub at the very extreme of visibility to the nearest ship. This is based on the assumption that if I can barely see the top of the boat, they boat can't see my sub.
Advantages: I can get a very good track of the course and tell when the ship/convoy changes direction. It would be easier if the game would have the ability to calculate and automatically steer a parallel course.
Disadvantages: You really can't use TC very much so this is very very very boring.

I have lost convoys at 16x TC so mostly I use a max of 8. This really only works when the ship is moving slow so I can overtake within an hour or two.
2. Sneak-a-peek - This is where I get close enough to get a good plot of the ship and then scoot back to where the ship is no longer visible to me. I make sure that I carefully mark my chart with not only the position of the ship but my position. I than race ahead on what I think is a parallel course.
After "some time" I turn in to where the ship is until I detect the ship and then plot my position and the position of the ship. Then I scoot out of range again.
Advantages: You can use TC
Disadvantages: Much harder to get a good plot and very easy to miss a course change.
Overtaking a convoy is not fun at all.

I really only do it when the convoy is moving at a slow speed. Spending six hours of RL time overtaking a fast convoy at 4x TC is not my idea of a fun evening.
Good luck with it.