How to unlock AT&T iPhone 4 to T-mobile?

Having a hard time unlocking my AT&T iPhone 4 to t-mobile.

Try contacting att or jailbreak the phone

Only Apple can actually unlock them - it's an update sent to the specific phone via itunes.

You have to get it done via your phone service provider. Once you get a confirmation the unlock has been processed, connect your phone to itunes and let it update itself.

Note that you have to put a SIM in for a different service provider (that was previously locked out) when connecting to itunes, to trigger the unlocking update.