How to unlock/ break passcode on a iPhone 4?

I bought this iPhone 4 on the street and I followed YouTube videos on how to break the passcode since I didn't get one. After following instructions the phone starts off as factory mode but doesn't want to connect to my Wi-Fi to do the process and when I try to connect it to iTunes it asks for the iTunes ID password from the last owner. How do I totally hard reset this phone?

I hope you actually brought the phone ^.-

… Put it into Restore or DFU mode.

You do realize you have a stolen phone right?

The owner can track you down as we speak.

Anyways DFU mode, but you shouldn't buy stolen goods. Imagine if someone rips your phone off!