It is an unpaired, median organ located in the most anterior part of the superior mediastinum, in front of the brachiocephalic veins and the superior vena cava; in the midline it is related to the trachea. In childhood it also occupies part of the anterior mediastinum, in front of the heart and pericardium.
Thymomas (tumours of the thymus) can cause symptoms through compression of neighbouring organs. They sometimes cause dyspnoea (difficulty breathing) through compression of the trachea, or engorgement of the neck veins through compression of the brachiocephalic veins and the superior vena cava, since this impedes venous return.
Structure
The thymus is made up of two lobes (right and left), joined in the centre by a narrower portion called the body. Both lobes have an extension in the cranial direction, known as the thymic horns, which reach up to the base of the neck.

The thymus is a lymphoid organ and its main cells are lymphocytes. During fetal life and in childhood, until puberty, the thymus is very well developed. After puberty it begins to undergo progressive involution, characterised by a progressive decrease in lymphocytes, which are replaced by adipose (fat) cells.
The thymus is very sensitive to the action of external factors: nutritional deficiencies, repeated infections, vitamin deficiency and so on can cause early involution of the thymus.
Function
The thymus is regarded as a central lymphoid organ that has an essential influence on the development and functioning of the peripheral lymphoid organs. It appears that the thymus produces lymphocytes, which are sent into the bloodstream and go on to colonise the peripheral lymphoid organs. It might also produce some kind of humoral factor (carried in the blood) that would stimulate the development of the lymphoid organs.
The thymus is of great importance in lymphocyte differentiation. T cells (responsible for cellular immunity) acquire immunocompetence in the thymus. Put simply, once these T cells have passed through the thymus they are able to recognise the body's own cells and can trigger different reactions against foreign cells that might enter it. Among other things, T cells are involved in the rejection of grafts or transplants.