If you need to delete from your phone pictures, videos and other data stored on the memory card, you need to format only the memory card. For this, go to menu – applications – file Manager – memory card functions function the memory card is to format. You can also format the memory card by connecting the phone to PC as a USB drive by right-clicking the mouse on the icon of the memory card in Windows Explorer, choose the menu item "Format".
If you need to reset your phone to the settings made at the factory, you should do a Soft reset. To do this, enter on the telephone keypad service command *#7780# or go to menu – settings – phone management – factory settings. After you request a code, enter 12345 and settings will be reset. In some Nokia models the possible partial loss of your personal data so save your contacts and other information.
In the case when you need to completely format the phone, including all personal data and settings, you can do a Hard reset. On the phone keypad, dial the service command *#7370#. After you request a code, enter 12345. All data and settings will be deleted and restore them would be impossible, so be careful backing up.