How does buying used locked iPhone on ebay works?

Does it mean that I have to put in £20-30 monthly? Or is it just like pay as you go, but you are stuck with the provider for 2 years?

You only get stuck with a 2 year contract if you buy a new phone at a discount when you didn't already have a contract. If you start out with your own phone, they shouldn't make you do a contract.

What the monthly fee is, and whether it's the same as pay as you go or not, depends on the provider. But no matter what, if you show up with your own phone, there should be no contract.

You need 2 year contract