Not totally true. The T-mobile guy said that they will unlock your phone for you once you've been with them for 90 days.
As for what 'unlocking' a phone does:
GSM phones (T-mobile, Xingular, most Eurpoean carriers) use a SIM card as an identifier. The SIM card is what your provider uses to tell which phone/account is which. Pretty much all US phones come 'locked' to a SIM card... which means that your phone will only work with the SIM card that your provider gave you when you started getting service with them. In many cases this 'locking' of the phone also prevents you from altering the settings on the phone or updating/changing the software on it. This is done to make it harder (and more expensive) for you to take your phone (which you bought) and use it on a different network.
When you unlock a phone, you remove all those blocks and enable to phone to work with whatever SIM card you put in it. An example of how this can be useful is if you are traveling in europe. If you get a SIM card from a european provider (which are available over there cuz they often do not lock their phones), then you can make (and recieve) local phone calls on it without paying the international & long distance charges that you would have paid using your SIM card from the US.
As far as I know, the reason that people unlock their phones in the US is for when they want to use their xingular phone on t-mobile (or vice versa) and they want to load the t-mobile software onto their phone.... or they have gotten a new cell phone that they want to swap out with their old one.... or they saved their entire phone book on a SIM card and want to transfer it to a different phone.
If your provider refuses to unlock your phone (as many often do), then you can usually have it done by a third party... but expect to be charged money for the service. Unlocking usually involves pressing 2 or 3 buttons and then entering a code based on some serial number your phone has.
It should be noted that only GSM phones use SIM cards. Sprint/Nextel & Verizon are CDMA networks, and CDMA phones do not use SIM cards.