The first thing to ask is whether or not you actually need to unlock. Although you may have always used your phone on the same network there's a chance your device isn't network locked. Some retailers such as Carphone Warehouse often provide customers with unlocked devices
The simplest way to check whether or not your phone is network locked is to try a SIM card from another network. If you've got a friend or family member on a different network you could ask to borrow their SIM card briefly to check if your phone is unlocked or not. On most phones you'll get a very clear message that your phone is network locked when you try to use a SIM card from another network.
Mobile phone recycling companies will usually pay more for an unlocked handset compared to a phone locked to a specific network, especially newer devices like iPhones. Unlocking your phone will help you get the best price and if you've finished your contract for that phone then you should be able to get it unlocked for free (it'll cost recyclers money to get it unlocked which is why they'll pay less for a locked phone).
The amount you gain from unlocking depends on your network and phone model but as an example of the the difference it can make let's take a look at how the prices changes when selling an iPhone 11 Pro 64GB to We Buy Any Phone:
Prices correct as of September 2020.
Locking your phone to their network might seem like something mobile phone operators do just to make your life more difficult but it's simply a financial decision. When you get a new phone from a network they're subsidising the cost of the handset and they don't want you to simply use that phone on another network and give your money to another company instead of them.
Three no longer lock their handsets so any phones you've bought from Three since January 2014 come unlocked and ready to use on whichever network you like. Retailers such as Carphone Warehouse often provided unlocked handsets with contracts so if you didn't get your phone directly from your network there's a chance it's already unlocked.
The official unlocking method for iPhones will not work unless you remove the jailbreak and related applications first!
It's important to know the difference between unlocking your phone and unblocking your phone. Unlocking your phone means removing the restriction which locks it to a network, allowing you to use a SIM card from other networks too. This is completely legal and since October 2016 networks must unlock your phone for free once your contract has finished.
If a phone is blocked rather than locked it means that the phone has been disabled, usually due to being reported as lost or stolen. Attempting to unblock a phone is illegal, but unless you are in possession of a stolen phone then you shouldn't need to do it anyway!