Female cats whine while in heat to communicate receptiveness to males. Hormonal changes can also cause stress and physical discomfort, leading to vocalization. Whining may also be a way to seek attention or mark territory.
Excessive whining can sometimes indicate medical issues, so consult a veterinarian if your cat seems distressed.