can I buy an iPhone to use for TMobile?

I really need a new phone but I have TMobile and I want to iPhone. Some people tell me the iPhone won't work since the sim card slots of TMobile and the iPhone are different.

iPhone

Follow this Question