The Do Not Disturb feature in iOS silences all but the most important calls and notifications, especially useful when sleeping, attending a meeting, or watching a movie. Did you know though that iOS 12 offers ways to have the mode automatically turn off under certain conditions?
The trick is a contextual menu in the Control Center. Open the Center, and unless you've removed it there should be a crescent-shaped Do Not Disturb icon. On devices with 3D Touch — meaning most iPhones from the iPhone 6s onwards — you'll want to deep-press it. On iPads, the iPhone SE, and the iPhone XR, you'll have to long-press.
This brings up a series of options. The first simply turns the mode on for an hour, which you should be careful with, since you could easily miss a call or message if you overshoot. The same goes for the second, which turns it on until the next daily milestone — if you open the menu at night for example, you'll see "Until tomorrow morning." Normally it's better to set a fixed schedule than rely on this.
More practical is "Until I leave this location." This relies on your device's geofencing, and it's probably the best choice if you're at a theater or other location where silence is mandatory. Be warned that you'll want GPS location tracking on to make this precise.
If you're attending an event for which you have a Calendar entry, you'll see a fourth item: "Until the end of this event." This is another excellent pick, as long as you've reasonably gauged how long the event will take and you know you can be incommunicado the entire time.