You can switch this on at night or when you do not want to be bothered by your phone. Right below Do Not Disturb is an option for Notifications, allowing it to turn off at a certain time or who you can receive calls from. Optional settings for Do Not Disturb:
Scheduled: Automatically enable Do Not Disturb between the hours you specify. Allow Calls From: Allow calls from everyone, no one, your favorites, or specific contact groups.
Repeated Calls: If someone calls you twice within three minutes, the call will not be silenced.