If the iCloud ID associated with your iPhone is yours, you just have to login with your Apple ID details.
However, if the iCloud ID is NOT yours, you have to remove and deactivate that account in order to use your iPhone.
To get your Activation Lock or iCloud Lock removed and deactivated, we recommend this solution:
This eBook is a Do-It-Yourself Tutorial which contains all legal methods that can be used by ANYONE to proceed with a Legal and Official iCloud Removal Request from Apple and/or Original Owner.
It also includes ready-to-use templates for real case Scripts and Communication between Apple and Original owner's that will increase the chances for removing the iCloud Lock from your iPhone/iPad.