Sometimes germs can get past the immune system's defenses and cause infection and inflammation. Encephalitis is an inflammation of the brain, most commonly caused by a virus.