When handing your device over to someone else, such as a child, you can use Guided Access mode to restrict access to certain buttons. To enable this, open the Settings app, select the General option, then Accessibility. From here choose Guided Access and turn it on. Tap Set Passcode too, so it can’t be turned off too easily.
Then, while using an app, quickly triple-press the Home button to turn on Guided Access mode. You can then draw around buttons on screen that you don’t want to be enabled, such as links to in-app stores, before handing over your iPhone.
There are some extra options within Guided Access Mode that you can also enable. Tap Options to reveal them. Here you can decided if certain buttons should be enabled, such as the Sleep/Wake Button, Volume Buttons, Keyboards, and more. It’s also possible to set a Time Limit so you can limit iPhone usage and retrieve your device.
When you get the device back, triple-press the Home button three times, enter your passcode, and select End. If you have a Touch ID enabled device, press the Home button and hold it until it states that Guided Access has ended.