Well no of course the phone will not work if you purchased it from a T-Mobile store becaue the phone is locked to T-Mobile, so no other sim card will work in your phone. If you want to use the phone, you will have to contact T-Mobile and get them to unlock it for you.
Nothing else to do but contact T-Mobile and if you wanted an unlocked iPhone that you can use, then the only way to get one is to purchase it directly from the Apple store. Nowhere else sells unlocked iPhones except the Apple store.
You may be able to use your T-Mobile locked phone in another country if you ask T-Mobile to activate "roaming".
Roaming is using your phone in a different country from the one where your contract is. And it can be very expensive because you're paying for the cell phone network usage in both your country and the one you're in.
Ask T-Mobile how you can use your phone in Saudi Arabia.
Why are you replying to me and not the OP? Be careful when posting that you are responding to the correct person.
Also, I know all this about roaming, but that is not what the OP is actually asking. They have bought an iPhone that is on T-Mobile that is locked to T-Mobile and which they thought was unlocked and would work with local sim cards in their country. However, the only way to purchase an unlocked iPhone is directly from an Apple store.
The only way that the OP can use that T-Mobile phone with local sim cards is to contact T-Mobile directly and get the phone unlocked. I very much doubt that they want to use the phone with international roaming charges, so to be able to use a local sim, they need to contact T-Mobile to unlock the phone so that they can use it in Saudi as intended.
Uh, does it make a difference? In any case, sorry to offend!
I didn't see in the original post that he wants to use a local SIM card. I just see that he wants to use his T-Mobile phone in another country. Even if it's locked to T-Mobile, he can use it to "roam" if this is permitted by T-Mobile and he'll have to request this from them.
To say that you doubt he wants to use the phone with international roaming charges is assuming something you and I don't know. We don't know the situation, and until we do we should describe all possible solutions.
Just trying to be helpful!