The PAS stain identifies polysaccharides, mucus substances, basement membranes, and some fungi by causing them to appear magenta under the microscope. It works by first using periodic acid to oxidize carbohydrate groups, then exposing the tissue to Schiff's reagent, which causes aldehyde groups produced in the first step to appear magenta. The PAS stain is used to identify conditions involving abnormal glycogen storage or mucus production, such as certain tumors, infections, and genetic diseases. It helps diagnose issues in tissues from the liver, kidney, lung, muscle, and other organs.