To reset your phone these are the steps. (I speak on behalf of Samsung Galaxy Pocket S5300 only though)
1. Power off your phone.
2. Press your volume-up button, your home button and your power button till your System Recover Screen comes up.
3. Scroll down to “wipe data/factory reset”and press the home button to select this option.
4. A confirmation screen comes up. Scroll down to “YES — DELETE ALL USER” and then press the home button.
5. Select the “Reboot System Now” option next and wait for your phone to reboot.
Your phone will then boot with all data wiped and all settings reset. At least you can use your phone after this.