Are you having difficulties with the Apple Messages App, or just with sending/receiving SMS/MMS messages relayed via an iPhone?
Start here:
If you can't send or receive messages on your iPhone or iPad - Apple Support
If you can’t turn on or sign in to iMessage or FaceTime - Apple Support
If you have an iPhone, ensure that both iPad and iPhone are signed-in to iCloud with the same AppleID. To send SMS/MMS messages (green bubbles) from your iPad, verify that you have explicitly enabled Text Message Forwarding for your iPad on your iPhone...
On your iPhone:
Settings > Messages > Text Message Forwarding - set to ON - and explicitly enable your iPad from the list of devices.
Also ensure that Messages in iCloud is enabled on both your iPhone and iPad:
Settings > [Your Name / AppleID] > Messages - set to ON