Same advice as above.
If it's calm weather and you have to take them on for whatever reason, an under keel shot at no less than 350m and no more than 500m will often result in their demise. Just make sure you take it's direction changes into account if it's doing zig zags.
Otherwise stay away

, a quick search for evasion tactics or similar should give you a wealth of info to try and avoid being sunk.