The only issue you will probably have is unlocking it as you're current company T-Mobile contract probably won't include data or not lots of it so that's needs to be addressed. I doubt you can use the app store also but you might be able to via iTunes??
Ensure your phone is not upgraded beyond iPhone software 2.1 as it shifts the phone's baseband and it gets tricky to unlock.
Download QuickPWN. And run this on your computer. For some reason it is not happy with modern intel based Mac's but works on older Macs and PC's. This is what is known as 'Jailbreaking' This will enable you to download a whole range of free programs through it's inbuilt program called 'Cydia'.
OK, once you've jailbroken your phone you need to open Cydia and search for a program called 'yellowsn0w'. I haven't mis-typed it, it is a zero in there.
Run Yellowsn0w and as long as your sim does not have pin protection, put it in the phone and turn it off, turn it on again and within about 20 seconds you've just unlocked your phone.
Don't upgrade to the latest software version 2.2.1 as it will re-lock your phone.
There are a few hardware-based ways of unlocking your phone, but these are expensive.
Done it on 3 iPhone 3G's now, thank god for insurance as I have butter-fingers. At least I have now replaced the touchscreens for £30 and got everyone in the family a cheap, unlocked iPhone 16gb.
There is a load of web-forums dedicated to people doing this, who can help you, do a quick google search.