How to hard reset my iphone first generation if i forgot my password?

So i let my cuz use my iphone and he put a code on it and now i can't get into my phone i have nothing on it so i just want to start fresh and since its locked i can't get into the settings to erase everything and get rid of the password.

Put the iPhone in DFU mode, and restore it in iTunes.
https://www.theiphonewiki.com/wiki/DFU_Mode