How to reset the apple ID that was used to set up an iphone?

So I bought a used iPhone 4S and there's a big problem, I can't do anything with it. I can't even get into it because it asks me for the apple ID that was initially used to set it up. If anyone has any idea how I can reset the apple ID that would be great.

Hook it up to your computer, open itunes, go under device and you will be able to reset it there.