Bought an used iphone, how do i unlock it so i can use it?

I bought an iphone 4s from a friend and i want to use it but it says i need the original apple id to use it and i can't get it because the person who sold it to me doesn't know it because they bought it from someone too.

Added (1). i think it's reported lost & it's from at&t.

Added (2). i restored it but it still won't let me use it.

Get an unlock code.

If you don't have that then you can't restore it as your own.

Do your homework next time before you throw your money away.

Are you sure your friend bought that from someone? If your friend can't find the first owner, go to the nearest apple service center.

Well don't know what you could do in that case. If at all possible you'd have to get into contact with that original owner.

Are you referring to iCloud lock or SIMLock or both? It can be removed. Look around, eBay or the site below. Please do not Google that as you would find many cheaters as well. But eBay is secure and the link I'm attaching as well.

Beware: if it is stolen you might not be able to use it even after the unlock (in case it is BLACKLISTED)