Residual capacity refers to the volume of air remaining in the lungs after a maximal exhalation, crucial for maintaining lung function and preventing collapse. It ensures that the lungs and airways remain slightly open, facilitating gas exchange and providing a buffer against sudden changes in oxygen demand.