Your immune system protects you by defending the body from disease and infection. When your immune system detects a threat (such as a toxin, bacteria, or virus), it mounts an immune response and produces antibodies and white blood cells to fight the invader.