Your iPad can detect which direction is up, and as a result, it can automatically adjust the screen to always be right-side-up. However, there are times when you do not want your iPad to automatically rotate – such as when you are using a stylus for handwritten annotations or when you are giving a presentation.
To prevent your iPad from automatically adjusting, you need to activate the Lock Rotation feature. If you use this feature a lot, I recommend setting the iPad’s side switch to Lock Rotation. When this setting is selected, the side switch is used to turn on or off Lock Rotation.