Excretion is the process by which metabolic wastes and excess substances are removed from the body to maintain homeostasis.