First, try this:
From the main home screen, tap menu
Tap Settings, then Privacy
Tap Factory data reset
Tap Reset phone
Enter your password, then tap Yes to confirm
If that doesn't work, or if your phone is frozen:
Turn the power off. If your Samsung Galaxy S is frozen, pull the battery out and...