The thymus gland plays a vital role in the immune system by producing antibodies it is located in the chest near the heart.