Fresh stain – rinse the garment with cool water and wash it in the washing machine.
Dried stain – soak the garment in an enzyme-based stain remover.
Then, wash in the washing machine. If the stain does not vanish, try to remove it with a bleach suitable for your garment.