I have a iPhone 5s on 02 giffgaff and my contract is with three how do I unlock my iPhone?

They said I needed to connect it to a laptop through iTunes and do it that way with a 02 SIM card in the mobile while I do this but I don't understand it fully any suggestions?

Giffgaff is a UK mobile telephone network. The iPhone 5S released on September 20, 2013 and discontinued on September 19, 2014 (more than four years ago). So by now, you surely should be eligible for an upgrade.

The final, and only reliable, safe, and permanent, unlock for your iPhone 5, 5s, or 5c, is IMEI or Network Unlocking.

1. First located your IMEI code. This is the unique id for your iPhone and you need to provide it so you can get it unlocked. The steps to find it are below

Method 1: Dial *#06#
Method 2: For iPhone 5 or newer, your IMEI is located on the back of the device
Method 3: For non-activated mobile devices, there's a little "i" button on the activation screen, click it and you'll see the IMEI on the screen
2. Determine the model of the device you want to unlock such as iPhone 4, 5, 5c, 5s, 6, 6 plus, 7, 7 plus, iPad 2 etc.
3. Choose one of the services we review below in the article and provide the IMEI number
4. Click the Unlock now! Button.
5. Pay the fee using either Visa or Mastercard. Enter your email address for updates on the status.
6. You should hear back in 1-3 working days.

For the record its O2 not 02.

Anyhow, not sure on the specifics but you'd likely need to contact O2 concerning that. Its not just a matter of running it through iTunes, though it is involved in the process. That or there may be 3rd party services that can do it, though I'm not sure of any in the UK.