Ok now we getting somewhere.
There are 3 terms that you need to be familiar with.
1. Jailbreak- this allows you to add third party software and do other things to your phone.
2. Hactivate- this gets you off the Emergency screen and allows you to actually use the phone's programs
3. Unlock- what you need for Tmobile
Redsn0w will jailbreak and hactivate your phone for you.
Blacksn0w will unlock the phone.*
The main caveat is, It depends on what firmware you restored to.
If you restored to 3.1.3 then you can jailbreak/hactivate only not unlock. 3.1.3 updates your firmware and baseband. There is no unlock for that.
If you restored to 3.1.2 then you can jailbreak/hactivate and unlock.
I would suggest you use Redsn0w 0.92. Google it, it is usually the first link that is in google.*