When the Union Flag is flown on a ship (specifically, on a ship's jackstaff (thanks lagrange)) it is correct to call it the Union Jack. Not at any other time. Although plenty of Brits as well as foreigners make this mistake.