This method is appropriate for 2-5 devices or devices at a time- I do not recommend it for an entire 1:1 classroom.
Start by opening your Settings, then click and open Accessibility (make sure you are under "general" in your settings).
The iPad is now locked into the app. If they try to close the app using the home button, they will get a notification at the top of their screen. If they triple-click the home button, they will be prompted to enter the passcode that you set (which hopefully they don't know).
Triple-click home button and enter the passcode that you set to unlock the device from the specific app. Make sure you don't have any students peeking over your shoulder when you enter the code... they can be quite sneaky!
You can always access the guided access settings by triple-clicking your home button. There are more options for additional control in these settings. You can circle specific areas that you want not allowed in the app. These areas will appear gray in the app when your students are using them. They will not be able to click into those areas.