Both processes rely on blood circulating throughout the body.
Blood is oxygenated in the lungs. The blood carries the oxygen to tissues, where the oxygen is released so that tissues can use it for cellular respiration. At the same time, carbon dioxide waste produced by the tissues enters the blood and is carried back to the lungs to be exhaled. At the same time, fresh oxygen enters the blood and the cycle begins again.
This is a very general explanation but I can explain in more detail if needed.