Endocrinology is the branch of medicine that studies and treats hormonal disorders related to glands such as the thyroid, pancreas, pituitary, adrenal, and reproductive glands, managing conditions like diabetes, thyroid diseases, growth disorders, and hormonal imbalances.