Is it possible to get into an iPhone without knowing the passcode?

My friend gave me an old iPhone they didn't even need anymore. They just don't remember passcode!

Reset it maybe

It's possible by entering DFU mode - https://www.theiphonewiki.com/wiki/DFU_Mode

From there you can restore it via iTunes without needing the passcode. This doesn't bypass iCloud Locks though, if your friend has Find My iPhone enabled on it then they'll have to enter the password to their iCloud account after the phone is restored, this is to stop thieves from restoring stolen iDevices

There's no way to bypass an iCloud Lock, so if you have a stolen phone and trying to bypass that, then you're out of luck

Nope. That would sort of defeat the purpose if it was possible.

If they don't remember the passcode I hope they remember their Apple ID password, cause you may need to reset the phone & that is part of that process.