It is rather obvious.
The SIM card has a PIN lock code on it.
Either remove the PIN lock or replace the SIM with one that does not have a PIN lock.
The only other interpretation of the message is that the SIM is from a carrier other than the one the device is carrier locked to.
Has the SIM ever worked in this iPhone?
I've called AT&T, went into the store, and called Apple about this. AT&T has verified that the phone is an AT&T phone, and my sim card has no pin lock. The sim has never worked on this iphone, I was told by the store that I can just insert my old sim into this phone and it should work, but it still gives me the same message after inserting my sim. I'm going to the store today to see if they can just give me a new sim card, and if that doesn't work I'm out of ideas.