The heart has muscular walls and a valve between its chambers. Blood is pumped from the heart to the gills, where it receives oxygen and gets rid of carbon dioxide. Blood then moves on to the organs of the body, where nutrients, gases, and wastes are exchanged. However, there is no division of the circulation between the respiratory organs and the rest of the body. That is, the blood travels in a circuit which takes blood from heart to gills to organs and back to the heart to start its circuitous journey again.
Frogs have a three-chambered heart, consisting of two atria and a single ventricle.
Blood leaving the ventricle passes into a forked aorta, where the blood has an equal opportunity to travel through a circuit of vessels leading to the lungs or a circuit leading to the other organs. Blood returning to the heart from the lungs passes into one atrium, while blood returning from the rest of the body passes into the other. Both atria empty into the single ventricle. While this makes sure that some blood always passes to the lungs and then back to the heart, the mixing of oxygenated and deoxygenated blood in the single ventricle means the organs are not getting blood saturated with oxygen. Still, for a cold-blooded creature like the frog, the system works well.