How does Boyle's law relate to respiration?
The thoracic cavity that holds your lungs is fairly static as the rib cage is not flexible nor is there musculature to move the ribs. However, at the base of the ribcage is a large flat muscle called the diaphragm that separates the thoracic cavity from the abdominal cavity.
When the diaphragm relaxes the muscle is compressed upward which reduces the volume of the thoracic cavity increasing the pressure within the newly compressed space and creating a pump that forces air molecules from the lungs to travel up the bronchioles, into the bronchi, trachea, larynx and pharynx and exit the body through the nasal passages or the mouth if you standing slack jawed and open mouthed like a Neandrathal.
When the diaphragm contracts it pulls downward toward the abdominal cavity and expands the volume of the thoracic cavity. This in turns decreases the pressure in the lungs and creates empty space which forms a vacuum. This reduction in pressure pulls air into the lungs. That air can enter the respiratory tract from your nasal cavities or your neandrathal slack jawed open mouth, into the pharynx, larynx, trachea, bronchi, bronchioles and into the alveoli to diffuse oxygen and carbon dioxide.
It is the inverse relationship of Pressure and Volume of Boyle's Law that creates the pump - vacuum activity that allows for us to breathe.
I hope this was helpful.