Hi MrKing,
Unless you paid for your iPhone, namely handed over the best part of £600 in cash or credit/debit card payments, then you have a brand new O2 iPhone, for the sole use on the O2 Network, and will have been signed-up to either an 18 month or 24 month contract of some kind. You should have been given some paperwork that states exactly what tariff you are on.
If you want your iPhone to work on any other network, you will have to get it Unlocked (which is not the same as being Jailbroken)! This can be done yourself, with bits of software over the Net, depending on how competent you feel about doing it, or you can get it done in many independant mobile phone places around the UK, for about £30-£40. However, if you get good O2 reception in your area, it would be silly of you to Unlock it at this time, otherwise you're paying O2 at least £45 a month, for the next 18-24 months, and for no reason, whilst also having to pay money to use the iPhone on another network.
Don't forget to Port your current mobile number over to O2, unless you are happy to have an all-new mobile number!
Pooch