The function of intercostal muscle is to assist in respiration. There are 11 each of internal and external intercostal muscles in the human body.
Intercostal muscles fill in the gaps between the ribs. The internal muscles are on the sides between where the ribs meet and the vertebrae. The external muscles are on the sides between the line on each rib that marks an iliocostalis insertion and the sternum.
Internal intercostal muscles are exclusively used during exercise, sneezing and other vigorous exhalations. External intercostal muscles, by contrast, are used in normal breathing. They assist with thoracic cavity expansion and raising the ribs so that regular inspiration can take place.