If you have iOS 7, swipe up from the bottom, and then tap on the rotation lock icon. If you do not have iOS 7, follow the instructions below:
1. Double click the home button to bring up the multitasking bar.
2. Swipe right until the last set of icons is displayed in the multitasking bar (these will include play/pause and skip buttons for iPod or Pandora).
3. The furthest left icon looks like a circular arrow - touch this icon to enable or disable rotation lock on the iPhone.
4. A rotation lock icon will appear in the status bar next to the battery charge icon when rotation lock is enabled. This looks like a circular arrow around a padlock.