If you're calling a number that is usually based in the UK (eg. a friend who has taken their phone on holiday), then you just dial as normal.
If you're calling a number that's actually registered abroad (eg. a friend who LIVES in a different country) then yes, you do have to put the country code.