If the iPad is Activation Locked, without the help of your friend, the iPad is useless to you.
Here are the Apple support pages that outline the Activation Lock - and the only mechanisms by which it can be turned off:
Activation Lock for iPhone, iPad, and iPod touch - Apple Support
Turn off Activation Lock – Apple Support
As you will discover, unless you are the owner of the AppleID that was last used to activate the device, you’ll not be able to defeat or bypass the Activation Lock. With documentary evidence that you are the original owner (such as sales receipt showing the serial number), Apple may be prepared to assist - otherwise they and nobody here will be able to help you.
This page might provide useful additional insight into potential problems with devices previously owned by others:
The All Too Common SAD Reality of Buying … - Apple Community