I recently had to go through this procedure to help out a friend emigrating from the United Kingdom to South Africa.
His cellphone was locked to T-Mobile UK, basically turning it into an oversized paperweight...
While there are many other guides on this matter on the internet, this one...