You would normally ring the network provider to which the phone is locked, who make a charge (around £15) to issue you with the unlock code. Alternatively, your local market stall/newsagent can unlock the phone for around £10, but unlocking this way may/may not lead to a loss of some features of the phone.
I have a similar problem. I have a Nokia 6500c that I bought from o2, they assured me that it wasnt locked to the o2 network as I knew I would be coming back to South Africa, that would be a problem, when I got here, of course the damn was locked, I contacted o2 but as I hadnt had the phone for a year, they wouldnt unlock it. I bought another 6500c and have been using that one here and the other when I am in England. This morning the SA phone was stolen in the gym, as things are here if you are not too careful, I now need to unlock the English phone, but the problem is, that when I try and send the email, it wont go through as I cant remember the number of that phone and the only place I had it was saved in the other phone.
Please someone help me, I dont want to just have to buy another phone.
Just to let you know, I did, of course have to buy another phone, after paying the money and getting lots of unlock codes that didn't work. I am absolutely sorry that I ever dealt with 02 as I feel their untrained staff in the shop caused me to spend a lot of money buying 2 new cellphones. I gave up on trying to unlock the 6500c and took it back to the UK with me for my Mum to use, although she doesn't want to change from Orange. So I have had a perfectly good phone, that I have been unable to use for almost 3 years.