How to use my old contract iPhone?

I have got an old iPhone that was on contract but have upgraded since, I want to be able to use the iPhone again on pay as you go, how would I do this?

Stick a SIM in it, as long as it's with the same carrier nothing changes. If a different carrier you'll need to get it unlocked.

Pre or post pay, contract or not, The phone doesn't know the difference. All it knows is whether the correct carriers SIM (if locked) is in it.