The parathyroid glands are a set of four small endocrine glands located behind the thyroid gland in the neck. They play a crucial role in regulating calcium and phosphate levels in the body by producing parathyroid hormone (PTH), which helps maintain homeostasis of these important minerals.