If this is the 4 or 6/8 digit passcode or a screen lock password, then there is NO way to retrieve that passcode/password ***** get back to your iPad without the passcode/password (without losing files). Your only option is to force-restore the iPad to factory settings through iTunes by putting it to recovery mode, which will erase everything from it. This is how Apple designed it to protect the information of their users.
But if you've backed up your iPad to iTunes on your computer or iCloud, then you can restore all your data back after restoring your iPad from iTunes/iCloud. You can also redownload all your past purchases for free using the same account.
Follow the steps below to restore your iPad by putting it to recovery mode.
First download and install latest iTunes on your computer from here : https://www.apple.com/itunes/download/
Then connect the iPad to your computer with the USB Cable.
Open iTunes application on your computer.
On your iPad press and hold the Home button and the Power button at the same time UNTIL you see a USB cable pointing to iTunes icon on the iPad's screen. The iTunes will also detect a iPad in recovery mode and ask you to restore it.
Click Restore or Restore and Update button.
Note : Put it to recovery mode while connected to computer and also in recovery mode your iPad will show USB cable pointing to iTunes logo. And it will take a while to restore it.
Please let me know if that didn't work, so I will continue to help you until we fix the problem.