Hypothyroidism is classified based on the origin of the hormone deficiency, whether it stems from the thyroid gland itself (primary), the pituitary gland (secondary), or the hypothalamus (tertiary).