The anterior pituitary regulates several physiological processes. This is possible because it has the capacity to secrete hormones: ACTH, TSH, FSH, LH, GH, PRL.
In this case, your question refers to cortisol. ACTH is released, it goes to adrenal gland and causes it to produce cortisol.