Regardless of the type of stain, use a clean cloth and small amount of a dish soap to get out any of the compound that hasn't already set in. Depending on the type of stain that needs to be removed, different methods will work better than others.
For a urine stain, add a teaspoon of dish washing soap directly to the stain and scrub as much of the stain out of the underwear as possible. Use cold water, as hot water will set the stain. Baking soda is effective in removing children's urine stains, but it does not remove all adult urine stains. If the latter is the case, create a thick paste with baking soda and a small amount of water and rub into the urine stain. Proceed to launder as usual.
If the stain is a blood stain, it is easiest to remove while still wet, but for dried blood stains, begin by blotting the underwear with a clean cloth to remove any blood that has not set. Be sure not to scrub, as it will only rub the blood into the fabric. Work from the outer edge of the stain inward, then let the stained underwear soak in a bowl of cold water for a while, adding detergent if desired. If the stain remains, let it soak over night. If it still remains, let it soak in a combination of 1 cup of salt with 2 quarts water for 30 minutes.