Treat the ink stain as quickly as you can. The longer you leave it, the more difficult it will be to remove.
Prevent newly-leaked ink from spreading throughout your fabric by applying hydrogen peroxide to the stain. If the fabric allows for it, one part hydrogen peroxide to one part ammonia to make the stain easier to remove.
Apply a pretreating fluid or a detergent to the stain, then wash. It’s more difficult to see stains in wet fabric so let it air dry and look for the stain. If no more ink remains, you can wash it as you normally would. Otherwise, repeat the procedure.
Blotting ink stains using rubbing alcohol may also work. Be careful if you try this because alcohol can cause some colors to run.