Inspiratory muscles, primarily the diaphragm and external intercostal muscles, expand the thoracic cavity and increase lung volume during inhalation. Expiratory muscles, such as the internal intercostal muscles and abdominal muscles, aid in active exhalation, especially during intense activities or forceful exhalations.