You can use the side switch on iPad to either lock the screen rotation or mute some iPad sounds. Tap Settings > General and find “Use Side Switch to:” then select Lock Rotation or Mute. Please note that not all iPads have this feature.
If Mute is selected, the switch on the side of the iPad mutes system sounds. If you choose Lock Screen Rotation, then the switch locks the screen.
Your Control Center
If you have the side switch set to lock screen rotation, then the mute function can be modified in the Control Center (swipe up on screen from the bottom.). If you have the side switch set to mute system sound, then your Control Center offers a button to lock your screen orientation.