The lungs are a pair of spongy, air-filled organs located on either side of the chest (thorax). The trachea (windpipe) conducts inhaled air into the lungs through its tubular branches, called bronchi. The main function of the lungs is the process of gas exchange called respiration (or breathing). Lungs are inside of your rib cage.