When my son cut his leg open and stained his new jeans, I used hydrogen peroxide to get the stains out. My Aunt told me to try it and it worked great. Of course, they had to be washed immediately after.
Depends on how old the stains are. The first step is to rinse it with cold water. Then let laundry detergent/stain remover soak on the spot for a few minutes.