I had an Apple iPad where the side switch wasn’t locking the screen rotation. I had no idea there was a simple setting that toggles the side switch functionality.
The setting is probably set to mute the device. You can change it by doing the following steps.
1. From the home screen, select Settings.
2. Choose General.
3. Scroll down and make sure that select Lock rotation in the Use side switch to: area.