To double check: Go into Settings > General > Use side switch to. If its set to lock rotation, flip the switch next to the volume rocker. If its set to mute, double tap the home button, swipe the bar that just popped up to the left, and tap the button on the far left. If this doesn't help you, there may be a problem with your accelerometer and it may be time to take it into apple/wherever you got it