The cortex is the thickest layer of hair situated between the outermost cuticle and the innermost medulla. It contains pigment granules that determine the color of the hair. Additionally, the cortex provides tensile strength and flexibility to the hair due to its keratinized structure.