Writing in 1889, the Swiss pathologist Ernst Ziegler observed that “a brief and precise definition of inflammation is altogether impossible.” Even back then, experts like Ziegler recognized that inflammation manifests in different ways, and that its activity can be both helpful and harmful.

Doctors today have a better understanding of inflammation and its role in illness. But their best attempts to define inflammation still lack the precision Ziegler found elusive more than a century ago.

According to the authors of a 2015 British Journal of Nutrition (BJN) study, inflammation is the immune system’s primary weapon in the “elimination of toxic agents and the repair of damaged tissues.” But when inflammation persists or switches on inappropriately, they write, it can act as a foe rather than a friend. Hardly a week goes by in which researchers fail to discover new links between inappropriate inflammation and a common disease or disorder.

Just last week, the Proceedings of the National Academy of Sciences published a study that found the brains of children with autism spectrum disorder contain an overabundance of inflammation-stimulating proteins. The presence of these proteins suggests a novel “connection” between inflammation and ASD, the authors of that study write. And it seems like, wherever doctors look, they find these sorts of connections. From Alzheimer’s and heart disease, to arthritis, cancer, and gastrointestinal disorders, elevated or out-of-whack inflammation is a common thread that ties together these seemingly unrelated ailments. Likewise, research has linked overabundant inflammation to mental health conditions, including depression and bipolar disorder.

To understand how and why inflammation seems to underlie such disparate forms of human conditions, it’s important to recognize that the term “inflammation” refers to a vast array of biological processes. “Inflammation is a broad term for many different types of immune-related responses,” says Dr. Jason Ken Hou, an associate professor and director of inflammatory bowel disease research at Baylor College of Medicine. Basically, inflammation is the body’s response “to anything that’s bad,” he says.

From Alzheimer’s and heart disease to arthritis, cancer and gastrointestinal disorders, elevated or out-of-whack inflammation is a common thread that ties together these seemingly unrelated ailments.

One type of inflammation, Hou explains, is designed to battle harmful bacteria or parasites. “If there’s an infection or an invading virus or bacteria, the body generates inflammation that destroys the invading agents,” he says. Meanwhile, there’s another type of inflammation that signals the body is recovering from injury. When the body is wounded, inflammation floods the injured area with cells and “cell-derived components” that repair, replace, or dispose of damaged tissue, says Valter Longo, a professor of biological sciences at the University of Southern California.

When a person’s immune system is working as it should, these and other forms of inflammation are transitory; they flare up in response to a legitimate threat or injury, and they settle down when that threat or injury has been addressed. But there are countless ways in which the immune system’s many inflammatory processes can go haywire.

In some cases, “inflammation that is normally designed to kill harmful viruses and bacteria can become misguided and start doing damage to healthy cells,” Longo explains. This form of inappropriate inflammation is present in people with autoimmune disorders such as Celiac disease and lupus, and there’s evidence that something similar may be going on in the brains of people with Alzheimer’s disease, he says. Some inflammation may be normal. But too much of it for too long can still be harmful. This seems to be the case when it comes to persistent inflammation caused by chronic stress or injuries.

There’s evidence that imbalances in immune-system activity can lead to harmful or out-of-control forms of inflammation. Hou explains that one branch of the immune system deploys inflammation in an effort to protect the body from parasites, while a separate branch uses inflammation to attack harmful bacteria or microorganisms. “The body likes to balance these, so when one is turned on, the other is turned down or off,” he says.

But if one of these branches becomes over- or under-active, the resulting imbalance can cause problems. This sort of imbalance may help explain why rates of some autoimmune disorders have skyrocketed in recent years. “In modern western societies, we’ve almost totally reduced exposure to worms and parasitic infections, and so as that part of the immune system is not used, the other part may be becoming hyperactive,” he explains.

In one form or another, inflammation is the immune system’s go-to weapon against almost anything it perceives to be a threat to the human body or brain. When a person is free of disease, inflammation has done its job. But when problems arise, it makes sense that inflammation would somehow be implicated. Because inflammation is so closely tied to the immune system, any behavior outside the norm is bound to cause illness. For now scientists are still exploring the ways it changes the body, for better and for worse.