The feature you need to know about on the iPhone is called Guided Access, and you can enable it by opening up iOS Settings and choosing Accessibility and Guided Access. Turn the Guided Access toggle switch on and the feature is ready to go—just make sure you use Passcode Settings to set a passcode to protect Guided Access mode.
To actually turn Guided Access on, you need to triple-tap the home button if your iPhone has one, or the side button if it doesn’t. You can then tap Options to configure how Guided Access is going to work: You’re able to restrict access to the volume buttons, for example, and the software keyboard. You can even turn off touchscreen functionality and put a limit on Guided Access mode. Tapping Start launches Guided Access.
Whoever is using the iPhone is then locked into the current app, so you need to open up the app in question—the Phone app, a particular game, or whatever it is—before you triple-tap the button on your device to launch Guided Access. You get out of Guided Access with another triple-tap of the same button, at which point you’ll need the passcode that you set at the start.
The idea is that without the passcode, the person using your iPhone can’t get out of the app you’ve put them in—there’s no way to switch apps, open up the Control Center, or even turn the phone off. It’s worth being aware of the app that they’re in, though, and what they can do inside that app: If you’re showing someone your photos, they’ll be able to access all of them.
One extra option in the Photos app is to hide photos and videos by opening them, tapping the share button (bottom left), and choosing Hide. This hides these pictures and clips in a special Hidden folder. They won’t be visible in normal view in the Photos app, and they won’t appear in searches, but the person borrowing your smartphone can still get at them by choosing Hidden from the Albums tab.
Android
Apps can be pinned inside Android.
Google via David Nield
If you’re using an Android device, you can take advantage of a feature similar to Guided Access on iOS. It’s called App Pinning, and again the idea is that the person borrowing your phone is limited to one app. They’re not able to get to another app or access the phone’s settings without a PIN code set by you.