From AT&T to T-Mobile... Question

Hey all!

I'm an AT&T customer, I have a 2 year contract with the iPhone 4S, and I'm paying wayyy too much... I've seen that T-mobile has a 30$ Mobile 4G prepaid, that is very interesting. I've done the math and I'll cover the Early Termination Fee no problem in 3-4 months... I've also checked, and I can transfer my number to T-Mobile.

I have a couple of questions, What is the process I've to follow to change companies? Should I tell AT&T to move the phone number, and then AT&T will cancel the contract and pay then the Fee? Or the other way around? Also, once I'm out of AT&T, I will be able to use the iPhone with T-Mobile right?

I will really appreciate your help because I'm not from the USA, only being here for a year and a half, and I don't want AT&T to get advantage on me because I don't know the process...

Thanks!!!!!!!!!!