Hi and Welcome. My Name is XXXXX XXXXX I look forward to assisting you today with your question.
The random click sounds are not a good sign and automatic shutdowns are indications of hardware failure. If this is hardware related, then you have to take your iPad to the Apple Store to get it fixed.
However, we can try some basic troubleshooting steps. If this is software problem, this should fix the problem.
First we can reset your iPad and see if that works or not. Press and hold the Power button and the Home button at the same time for at least ten seconds. iPad will automatically restarts and return to home screen. If it does not restarts after holding the buttons for 10 seconds, hold down the Power button and the Home button until it restart itself.
If that didn't work, then we can restore your iPad from iTunes on your computer. If you don't have iTunes on your computer, then download and install it from here : http://www.apple.com/itunes/download/
Open iTunes and connect your iPad to your computer. In iTunes, select your iPad in the top right. Under Summary tab, click Backup. This will backup your iPad to your computer.
Then click Restore button. This will erase everything from your iPad and install a fresh OS on it. If this is system files or software related, this will fix the problem.
Please let me know how it goes..