Residents in the Bay Area and Los Angeles complained of poor air quality. The best thing to do about it? “Stay indoors.”

Credit...Eric Thayer for The New York Times

With wildfires raging up and down the state of California on Monday, smoke filled the air in many places, ash fell from the sky, and residents were once again left to wonder whether the very air they were breathing was safe.

The largest, the Kincade fire in Sonoma County north of San Francisco, nearly doubled in size in 24 hours and was just 5 percent contained on Monday, prompting volunteers downwind in the Bay Area to scramble to hand out masks and check on homeless residents.

At the same time, a brush fire broke out early Monday on the western side of Los Angeles and quickly consumed 600 acres. That blaze, known as the Getty fire, led to complaints about air quality near the campus of the University of California, Los Angeles, which canceled classes for the day. And smaller fires were burning as far north as Lake Mendocino and as far south as the mountains northeast of San Diego.

Here is what you need to know about the air quality in California this week, with some tips from experts on what to do about it.

[Read the latest updates on the fires, and sign up here for our California Today newsletter.]

Air quality is graded on a color-coded scale, with green for good quality, and yellow, orange, red, and purple representing increasingly significant risks.

After the Getty fire broke out on Monday, the Los Angeles area was experiencing moderately hazardous conditions — in the yellow category —  with some locations recording air that was unhealthy for sensitive groups, coded orange.

The Bay Area was also experiencing conditions in the orange range, with some “spikes” into the red range, which is generally considered unhealthy for everyone, according to Kristine Roselius, a spokeswoman for the Bay Area Air Quality Management District.

“It’s not great,” said Ms. Roselius, who recommended that people in the region stay indoors. Still, she said, the air quality in the Bay Area was not as bad as it was during the Camp fire, which blazed for more than two weeks in 2018, claimed dozens of lives and became the deadliest wildfire on record in California. “That was far more widespread, and it was higher levels,” she said of the air quality problems from that fire.

In general, wildfires come with a risk of breathing particulate matter, tiny pollutants too small to see individually that can cause a range of harmful effects when inhaled into the lungs.

“You’re breathing in some pretty nasty air,” said Steve LaDochy, a professor of geosciences and environment at California State University, Los Angeles. “It’s the fine particles that are the most dangerous — those are the ones that get into the lungs. You don’t see them, so you don’t know. But if you see smoke, there are definitely a lot of fine particles.”

Young children, older adults, people with asthma and people with pre-existing conditions are most at risk, but pollution from smoky air can affect even healthy adults.

When the air quality is poor, health experts recommend staying inside, closing windows to keep out smoky air, and using an air-conditioner with a recirculation option, if possible.

If you must go outside, experts recommend using a mask designed to keep out particulate matter.

A surgical mask, scarf or bandanna will not do much to filter out many pollutants. Instead, experts recommend a respirator mask, such as a N95 face mask, which is designed to filter out 95 percent of airborne particles. Respirator masks can generally be found in hardware stores or bought online.

Mask Oakland, a grass-roots group in the Bay Area that hands out masks to homeless people and other marginalized groups during hazardous air conditions, mobilized over the weekend. By Monday morning, the group had supplied about 3,000 masks to volunteers and community leaders to be distributed.

“I’m already getting emails this morning from schools and other centers,” said Quinn Redwoods, a director for the group. “People forget about us until people need a mask. I think there is a sense of collective denial that this is a worsening reality every year.”

Experts cautioned, though, that the masks should be used as a last resort.

“They need to be put on correctly, and that can take some degree of training,” said Dr. Kathryn Melamed, a pulmonologist at U.C.L.A. She noted that the masks will not seal correctly if someone has facial hair, for example, and they can give people a false feeling of safety.

The current and forecast air quality conditions anywhere in the United States can be checked on AirNow.gov, a website set up by the Environmental Protection Agency and other federal agencies.

Dr. Melamed said people should also monitor their own symptoms when the air they are breathing is less than pristine. While dry eyes and a scratchy throat may simply be a reaction to low humidity in fire-prone areas, she said, a cough, shortness of breath or lightheadedness could also be a symptom of something more serious.

“Ultimately,” she said, “I would recommend that people stay indoors when the air quality is poor.”