Welcome to MMi
Put the phone in DFU mode and let iTunes restore it. Then jailbreak with redsn0w and unlock will ultrasn0w if desired.
Here are directions for DFU in case you need them
and a link to a tree type menu that will guide you through the J/B process.
DFU mode
INSTRUCTIONS
Step 1. Turn off iPhone
Step 2. Hold down the power and home button.
Step 3. When you see the Apple logo, release the power button but continue holding the home button down.
Step 4. Open iTunes and wait for it to tell you that it detects iPhone in restore/recovery mode.
Alternative Method:
Step 1. Connect iPhone to USB then listen to the sound when it connects and disconnects.
Step 2. Hold the home and power buttons until hear the disconnect sound then release power button.
Step 3. Wait until you hear another sound then release home button.