Rinse the clothing under hot water to flush out as much of the marker as possible. Spray it thoroughly with a laundry pretreatment spray.
Wash the clothing on the heavy-duty cycle for about 12 minutes. Set the washer to the hottest water setting allowed for the fabric and use the appropriate amount of laundry detergent according to the bottle.
Stop the washer after about 12 minutes of washing. Add oxygen bleach or color-safe bleach to the washer according the package instructions. Let the garment soak for about an hour. Color-safe and oxygen bleach are generally safe for both colored and white fabrics.
Run the garment through a complete wash cycle, again using the hottest water allowed for the fabric.
Check the clothing after washing and before drying. If any traces of marker remain on the garment, treat the stain again. Whatever you do, don't toss the clothing in the dryer until the stain is out. The heat from the dryer may set in the stain.
Check your bottle of laundry detergent and make sure it's detergent and not soap. Using soap to remove marker can make the stain more difficult to get out.
Always test the color-safe bleach or oxygen bleach on an inconspicuous area of the fabric first. Although unlikely, check to be sure the bleach doesn't damage or discolor the fabric.