Yes. As stated in the iPhone user manual, "when it’s turned on and iPhone is locked, all notifications and calls are silenced, but alarms will still sound." Note that in addition to turning Do Not Disturb on and off in the Settings app, you can access its more sophisticated features in Settings > Notifications > Do Not Disturb. By defaut, the feature allows calls from your favorites and allows repeat calls (i.e., any second call within 3 minutes) to ring/vibrate.