Can I get an iPhone to work with my T-Mobile service?

My friend is selling their iPhone 4 since I've been wanting an iPhone for the longest time but I have T-Mobile as my phone service. They use sim cards to get connection.iPhones don't have that. I was wondering if there's any way for me to somehow make it work and have my iPhone work with T-Mobile?

If the iPhone is from AT&T, it will work (well, partially, anyway), because AT&T iPhones are GSM devices and also use SIM cards.

If this phone doesn't have one, it must be a CDMA model from Sprint or Verizon. If that's the case, no, it won't work.

Even if it is a GSM device, you will not get high-speed data (3G or 4G) service on T-Mobile's network, because all American cell carriers use different network frequencies.

Only t-mobile GSM or unlocked GSM phones will work on t-mobile network. Just because you want something to work, will not make it so.

Joe nailed it but he forgot to mention that an AT&T iPhone will require an unlock to use with tmobile. Other than that everything he said is correct to my knowledge. Even on an unlocked iPhone if you use tmobile you will only get 2g speed Internet despite the actual speed your plan offers due to the bandwidth incompatibility that joe mentioned.

If your friends phone doesn't have a sim tray then it's most likely sprint or Verizon meaning there's no possible way to get it to work on tmobile.