How to reset a used iphone 4?

I got a used iphone 4 a few days ago and i have no idea what the reset code thingy is. How can i reset it and delete everything off of it?

Open the Settings app on your home screen (or wherever you put it) and find General. Go to the bottom of the list and choose Reset. There you will see a number of options.

You'd have to get the code from the person, who sounds like they didn't properly reset the phone in the 1st place.