Hi, welcome to iMore.
I'm so sorry to hear this.
It may not be what you want to hear but my advice is to set Apple devices up right before you pay for it. Just start the device, try to set it up with your own credentials. If you get asked for a pin or a password from the (previous) owner, you'll be able to ask it right away.
Having said that, your best and only option is to go back to where you bought it from and have the seller disable the pin and password and disable Find My iPhone too.
If you're not able to track down the seller then I'm afraid you've purchased a paperweight and there is not much to do about that.
If you have any further questions, please join our forum. We're happy to help.