Sharks have gills with which they breathe oxygen and expel carbon dioxide.
The gills are organs that have a thin epithelium and in their interior blood vessels that transport oxygen and CO2. Because the epithelium is thin, it allows gas exchange between the seawater and the blood in the blood vessels of the gill. This is through a type of passive transport called simple diffusion (Oxygen and CO2 pass through the membranes without the help of any protein and without using energy in the form of ATP).
Therefore, the gas exchange in the gill would look something like this: