When you are stuck in Guided Access mode, you can be really stuck as the typical triple tap on the home button to quit out of Guided Access may not work. Even a forced exit won't work because the power button and the home button are disabled.
Devices with a physical Home Button
The only way to get out of Guided Access is to press the Home and Power button together for 15 seconds. This should turn off Guided Access by forcibly rebooting your device. Once your device is restarted, you can then go to Settings > Accessibility > Guided Access > Guided Access - and turn off Guided Access if needed.
Use Guided Access on iPad - Apple Support
Use Guided Access with iPhone, iPad, and iPod touch - Apple Support
Devices without a physical Home Button
For iPad’s without a physical Home button, you’ll need to follow a different button sequence…
- Press and quickly release the volume button nearest to the top button.
- Press and quickly release the volume button farthest from the top button.
- Press and hold the top button.
- When the Apple logo appears, release the top button.