Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

When the right conditions align, a weather phenomenon called a "heat dome" envelops the country, resulting in sizzling temperatures that last for days.

"A heat dome is the result of a couple of factors that are coming together. You've got your jet stream that is usually very, very far to the north into Canada," said NBC News meteorologist Sherri Pugh. "You have a building ridge south of the jet. That area acts as a dome, and then under this dome, you have a lot of sinking air. Sinking air is compressed and therefore it warms, and that adds an excessive amount of heat in the dome."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: 'Heat Dome' Will Make Parts of U.S. Feel Like 115 Degrees

The prolonged heat, plus the poor air quality, can quickly become dangerous — or even deadly — for those with respiratory issues or anyone out in the sun or in non-air-conditioned places.

Some areas are at risk of getting hit with a double whammy. In the Midwest, for example, a heat dome can be compounded by another weather phenomenon called "corn sweat," which happens when water is released from plant leaves, leaving the air extra-muggy.

Gabriel Powell, 3, plays in the sprinklers at Coal street park in Wilkes-Barre, Pa., on Friday July 7, 2016. AIMEE DILGER / AP

While the heat dome is notable because of how long it lasts, it doesn't always set heat records. However, temperatures can be 10 to 20 degrees above average for several days.

"While it is really hot, it's not necessarily record-breaking," Pugh said. "The challenge with heat domes, and the dangerous part, is the prolonged nature of the heat event. It's days of heat, and even your nighttime lows don't get very cool, so you don't get a chance to cool off."

Heat domes are not rare, Pugh added. But their size and duration vary, making some more dangerous than others.

"Their effects are most felt during the summer, and that's because the heat becomes dangerous at that time, as well as long-lived," she said.

They don't just happen in the U.S., either: In August 2015, the Middle East was trapped under a heat dome that made it feel like 165 degrees in the Iranian city of Bandar Mahshahr.