|MadSci Network: Zoology|
Spiders obtain their oxygen through four respiratory organs located on the underside of their abdomens. These organs are arranged into two pairs, an anterior pair at the very front end of the abdomen, and a posterior pair behind the anterior pair. Each of these can take one of two forms, book lungs or tracheae. In some spiders both pairs are book lungs, in a few both are tracheae, but in most cases the anterior pair are book lungs and the posterior pair are tracheae.
Book lungs consist of stacks of between 10 and 80 flattened hollow discs. These are bathed in haemolymph (the spider's equivalent of blood), and the shape of the book lung maximises the surface area at which gaseous exchange can occur. Air enters a hole in the spider's abdomen called a spiracle and diffuses into the book lungs. Since the spider's heart is continually pumping deoxygenated haemolymph through the book lungs, the concentration of oxygen in the air in the book lungs is always higher than in the haemolymph, and therefore oxygen will move from the air into the haemolymph down an oxygen gradient. The oxygenated haemolymph is then pumped to the organs where it delivers its oxygen.
Tracheae consist of a system of branching tubes, which extend from the spiracles to deliver oxygen directly to the organs. It is generally assumed that there has been a gradual evolutionary change from book lungs to tracheae, possibly in response to the need to conserve water, since a great deal can be lost across the large surface area of the book lung. Although doubts have been raised about whether tracheae could evolve directly from book lungs, the book lungs of some spiders have a small number of greatly elongated chambers, and these have been interpreted as an evolutionary intermediate in the evolution of tracheae from book lungs.
For more information you may wish to consult one of the following books, or indeed any good textbook of invertebrate zoology.
I hope this answers your question,