Sounds like you're talking about a SIM PIN. If that's the case, then you'll need to enter whatever SIM PIN was set -- that's got nothing to do with unlocking though.
After spending 45 minutes looking up various Sim unlock codes for tmobile, repeatedly asking my sister if she had a SIM lock code on her old phone, and contacting tmobile on christmas eve and getting unlock codes for the phone...nothing worked, and I gave up.
My sister (which this was her phone I was setting up) see's my frustration, asked what the problem was. I informed her, she is SOL on the phone because her sim (1 out of 3 I set up that night) had a password on it that I couldnt unlock. She then grabs the phone, types in 4 numbers...and said "Woops, guess my phone password carried over to this one" (She set up her own sim password, and thought she set one up for her old device only)
*FACE PALM!*