Spiders breathe using lungs or windpipes.

An excerpt from the article 28 facts about spiders

Lung tracheas evolved from the legs of aquatic arachnids. Tracheae, in turn, are bulges in the body walls of spiders. They are filled with hemolymph, which is used to transport oxygen and has an immune function.