"Do Not Disturb" allows you to block certain notifications whenever you want. It can also be set up to automatically come on at certain times.
- Go to Settings > Sound & notification
- Go to Do not disturb > Automatic rules
- Tap Add Rule
- Name the rule and tap OK
- Select the days, start time, and end time
- Tap Do not disturb to choose the notifications that can get through