A brain abscess is a pus-filled swelling in the brain. It usually occurs when bacteria or fungi enter the brain tissue after an infection or severe head injury.