Just above the Volume button on the side of your iPad is a side button that can be moved up and down. This generally is used for the Mute function.

However it can be changed to become a Screen Rotation Lock.
As you may have found, when you are using the iPad laying down or sitting back, or just when it’s on your lap it’s very easy for the screen to rotate without warning or choice. Locking the screen rotation will stop this from happening.

Now you can simply use the side button to allow or stop the annoying rotation.