The thymus gland is an organ in the upper chest cavity that processes lymphocytes, a type of white blood cell that fights infections in the body. This organ is part of both the lymphatic system, which makes up a major part of the immune system, and the endocrine system, which includes all glands that produce hormones.The thymus is most important in children and young adults, when it programs lymphocytes to attack antigens, like viruses.his organ is part of both the lymphatic system, which makes up a major part of the immune system, and the endocrine system, which includes all glands that produce hormones. The thymus is most important in children and young adults, when it programs lymphocytes to attack antigens, like viruses.