I think I would prefer to buy an unlocked phone and use it with the Tmobile service. How do I make sure it will work? Will any quad band phone work? BTW I understand I need to get a GSM not a CDMA phone.
First, yes it has to be a GSM phone, not a CDMA phone, which means (as a practical matter if you're in the US), that it must have a SIM slot. And that means, basically, only an AT&T phone. There are exceptions, but I'm pretty sure Virgin Mobile phones won't work, although I've never had a Virgin Mobile phone. If I'm wrong about that I know that at least a dozen people on this forum will jump all over me within 15 minutes.
As for "work," that means (even if it is an AT&T phone) that voice and text will work fine, but data will be limited to 2G (Edge) speeds, although some AT&T phones can get 3G speeds on T-Mobile's frequencies.
Also, what about data, do I need to look for anything specific, can I get 4g on an unlocked phone?
Only a true T-Mobile phone can get their 4G speeds. Let me clarify. T-Mobile offers data speeds at 2G (Edge), 3G, 4G HSPA+21 and 4G HSPA+42. HSPA+42 is generally as fast as the LTE service offered by Verizon, AT&T and (soon) Sprint, although local conditions vary. And HSPA+42 is available so far only in limited areas, although supposedly it will be enabled throughout the T-Mobile system by the end of 2012.
Note that there are two versions of "4G." All T-Mobile "4G" phones can use the HSPA+21 service (available most places now), but only the Amaze and Galaxy S2 can use the HSPA+42 service. Of course, future T-Mobile phones will be HSPA+42 enabled.
And finally, is there a good resource when shopping for an unlocked phone? I have found several on Amazon, but I think they are all no warranty, which seems a little odd..
I love Craigslist for phone shopping because I can limit the search to local sellers. That way I can see the phone before plunking down the cash. I'd be scared to buy on eBay, or even Amazon.
When I signed up for T-Mobile about August last year I went first to a T-Mobile store with my ancient unlocked AT&T Razr V3. I got a SIM card and signed up for the $70 unlimited everything prepaid plan. I put the SIM card in the Razr and it worked right from the start. Later I bought a two-year old MyTouch 3G on Craigslist, put the SIM card in it, and it worked immedately. Since it was a T-Mobile phone I didn't have to worry if it was unlocked or not. Shortly after the Galaxy S2 came to T-Mobile I found a local fellow on Craigslist who had bought one and then suddenly needed to raise money, so he offered it for $480, brand new in the box. Again, it was a T-Mobile SGS2, so no need to worry about being unlocked. His reasoning for the price was that he paid $530 and T-Mobile would have charged him a $50 restocking fee, so the $480 was the best he could do anyway. I bought it, put the SIM card in it, and it worked.
I sense that you're new to Android and smartphones. I suggest you spend a couple days Googling to get a bit more education. It's pretty complicated and making the right choice for your personal needs is not trivial.