I found an iphone 4 but it has a passcode how can i unlock it?

Okay so i found it about 6 months ago at the beach and i tried get a hold of the owner and everything but apparently they never responded so now its just been here with me all this time and i would love to use it at least as an ipod… ( i have a crappy phone) anyways do i have to jailbreak it or unlock it or what can i do in this case? Its the iphone 4

Use ireb to get into recovery mode, then restore as new in itunes.

Restore it with itunes.

You can unlock this by a gevey sim if baseband 4.10 or lower but you can factory unlock if baseband is above 4.10.