How do I change the iCloud ID on iPhone 5?
Two options:

1) Get the person you lent it to to enter their password and disable their account on your device.

2) Bring proof of ownership (sales receipt) and your device to an Apple Store and talk with a Genius. They will be able to reset the device for you.