First, try this:
1. From the main home screen, tap menu 2. Tap Settings, then Privacy 3. Tap Factory data reset 4. Tap Reset phone 5. Enter your password, then tap Yes to confirm If that doesn't work, or if your phone is frozen:
1. Turn the power off. If your Samsung Galaxy is frozen, pull the battery out and reinsert it 2. Hold the Volume Down button 3. Press and release the Power button 4. You are now presented with a menu that allows for Fastbook, Recovery, Clear Storage, and Simlock 5. Select Clear Storage by pressing the Volume Down button 6. Press and release the Power button 7. Now simply confirm your decision: Volume Up for YES and Volume Down for NO If you selected YES, all data including third-party applications will be deleted from the Samsung Galaxy S. Once the wipe is complete, the phone will reboot to its factory fresh state.