Prior to iOS 7 the Do Not Disturb feature only silenced notifications when your device was locked or in sleep mode. Fortunately, iOS 7 has changed that and made it possible to suppress notifications even when you're actively using your iPhone. Here's how:
That's all there is to it. Your iPhone will now silence all notifications, not just the ones that come in when your iPhone is locked.