The stains are most often caused by a combination of salt in your perspiration, what you eat, and the deodorant you use.
What can you do to remove the stain? The first thing you can do is try to prevent it in the first place. Do not dress immediately after applying deodorant. Wait a few minutes for it to dry. If you're in a rush, pump a few shots of air from your hair dryer under your arm, then get dressed. This will help prevent depositing deodorant and moisture in the underarm of the white shirt.
If you find yourself perspiring, get to a restroom, take a paper towel, and dab your underarm area. If you discover the underarm of your shirt is wet, don't give up. What you don't want to do is let the shirt sit around for a few days without attempting to clean it, says clothing expert, Steve Boorstein. Yellow stains tend to take hold over time, not as a result of wearing the shirt once. Use a product, such as OxiClean (according to the manufacturer's instructions), immediately. Or create a solution of one part water to four parts dish washing detergent. Place the solution in a spray bottle and lightly spritz just the underarm area of the washable T-shirt. Take a toothbrush and gently rub the area to break up the stain. Let it sit for a few minutes. Then launder it according to the label instructions.
For non-washable white tops, try blotting the underarm area with a small amount of water. (You don't want to use too much water; it could leave a ring.) Take the top to the dry cleaner.