I'm assuming your asking baout the programming lock code.
Anyway, if T-moblie is anything like Canadian mobile companys then your in for a tough time. For instance Bell mobility uses a unique lock code for every single one of thier phones sold. The only way to obtain it is by talking to a T-mobile dealer and asking very nicely for the lock code.
I'm not sure if you can actually "hack" a phone to either reset or find the lock code. It was possible with the older motorola "bag phone" with a "gender changer", but for new phones i'm not sure where to even begin.
Hope that helps...