Does an unlocked iPhone work on tmobile?

I've seen ppl sell unlocked iPhones on eBay and Craigslist but I never remember tmobile selling iPhone 4S or anousing them like they did with the iPhone 5

Unlocked iPhones (or any unlocked phone in general) will work with any carrier that offers service for that phone. When a phone is not unlocked, it is usually locked to a specific carrier under a contract, and will only work with that carrier for the length of the contract. After the contract expires, the phone becomes unlocked and you can bring it into any carrier's store. So yes, it will work with Tmobile.

Unlocked iPhone will work fine on T-Mobile.

Yes it will work at t mobile and if your phone is locked you will pay cost of unlock it only

T-Mobile didn't start selling iPhones until about the iPhone 5. Despite that unlocked iPhones can work on that network no problem. They had over a million iPhones on the there before they started officially selling them.