The HPA axis describes how hypothalamus (H), pituitary gland (P) and adrenal glands (A) interact between them to keep the equilibrium of the following parts in your body: immune system, digestion, use of energy. The HPA axis keeps under control the response of the body to stress.
Since the HPA axis works on feedback loops, you need to understand what is responsible for these feedback loops, and this is cortisol. Cortisol activates the response of your body to stress and then it activates the inhibition of CRH (corticotropin releasing hormone) and ACTH (adrenocorticotropic hormone) productions, by sending signals to hypothalamus and pituitary glands.
CRH (corticotropin releasing hormone) is secreted by the hypothalamus, as a response to stress, and it stimulates the production of ACTH (adrenocorticotropic hormone) in the pituitary gland.
ACTH (adrenocorticotropic hormone) is produced by the pituitary gland and it stimulates the adrenal glands to produce glucocorticoids.
The best known glucocorticoid is cortisol that activates the response of your body to stress.
The dysregulation of cortisol levels has an immunosuppressive effect to the immune system, hence, the more stressed a person is, the easier affected by pathogens they are.
The increased cortisol levels affect the density of pyramidal neurons in hippocampus leading to neuropsychiatric disorders caused by the hippocampal degeneration.