If you bought the phone at $180 with the Tmobile plan then it is locked, meaning you can only use it with Tmobile. After a certain period of time though, you can call tmobile and ask to unlock your phone and they will walk you through it.
A locked phone means you can only use it on the carrier's service you bought the phone from. An unlocked phone is a phone you can use on any carrier.
Locked and unlocked phones have to do with GSM phones or phones that take SIM cards like Tmobile and ATT. Verizon and Sprint use CDMA phones, which do not have SIM cards.
When buying an unlocked phone, you need to make sure the phone will be compatible with your wireless service's 3G band or you will be stuck using their slower data offerings.
I found this out the hard way back when I bought an unlocked Nokia n95 with my Tmobile service. The Nokia n95 operates on ATT's 3G frequency and not Tmobiles...I had super slow internet on tmo's EDGE network. Fail.
If you do buy a phone from a carrier and it is locked, you can unlock it by calling the phone carrier and telling them you want to unlock your phone. Most carriers allow you to do that after you've had your phone for a certain period of time.