1. Swipe down and check the Auto rotate tile. If it shows Portrait (locked), tap it.
2. Some apps (and many home screens) only work in portrait. Test with YouTube or the Gallery.
3. Restart the phone. Sensor glitches often clear.
4. Test the sensor: Samsung users can dial *#0*# and tap Sensor. Other phones: install a sensor test app from the Play Store.
5. Works in Safe mode? Then an app is blocking it (see our Safe mode tip).
6. Sensor test shows no movement after a drop or water? It's a hardware fault, bring it in.
Also check that "Rotate button" isn't the only option set in Display settings.