Your phone should have a toggle for this very thing under Settings. In looking at my phone, samsung moment from sprint, going to Settings>Sound & Display, bottom half of the menu, first under display settings section, should be a toggle labeled "orientation". Slappy's suggestion is really just a quicker way of accessing this same setting.
As for rotation in apps, I'm pretty sure that really depends on the app itself. Some only work in landscape (such as most games) while others flip-flop depending on the orientation of the device.