This will not fix your SIM card, but will get you to the home screen and viewable by itunes.
I'm not sure why your SIM is locked... did you pay your bill, or do you have a stolen iPhone?
Slide to the emergency dial screen
Type *#307# and then press Call.
When your iPhone starts ringing, press the X button in the top right to delete the string of characters you just called, then type 0 and hit call. It will start ringing again, hit Answer.
Press Hold' , and when your phone starts ringing again, press Decline. This should bring up the main dialer. Good.
Press Contacts from the bar running across the bottom of the screen, then hit the plus sign in the top right to add a contact.
You can put whatever name in you'd like, but I just put ours.
Then hit Save.
Click Add new URL, and enter the following in the URL field:
prefs://1F
This will take you into the Setting menu. Hit the WiFi button, and choose your network, and put in your password if you need to.
Now, restart your iPhone and go back to the Slide for emergency dial screen.
Once again, type *#307# and then press Call.
When your iPhone starts ringing, press the X button in the top right to delete the string of characters you just called, then type 0 and hit call. It will start ringing again, hit Answer.
Press Hold , and when your phone starts ringing again, press Decline.
This all should get you to the home screen, not sure though, haven't tried in awhile.
Still wont fix your SIM issue, maybe you can enter the SIM unlock code in Prefs. I would request a new SIM/iPhone if it hasnt been stolen or hacked. If it was stolen or hacked, go get a free Razr and a 2yr contract, take the SIM out and put it in a restored 1.1.1 jailbroken iPhone with anysim installed