If excessive sweating has no underlying medical cause, it's called primary hyperhidrosis. It happens when excess sweating is not triggered by a rise in temperature or physical activity. Primary hyperhidrosis may be at least partly hereditary.
If the excess sweating is due to an underlying medical condition, it's called secondary hyperhidrosis.
Health conditions that might cause excessive sweating include:
Fever of undetermined cause
Hyperthyroidism (overactive thyroid)
Medication side effects, such as sometimes experienced when taking some beta blockers and antidepressants
Pheochromocytoma (a rare adrenal gland tumor)