Tempera is one of the oldest paints in existence; some tempera paintings date to the first century. In other words, it's permanent. Don't worry, though; the kind you probably have to wash out of your child's shirt or expensive jacket isn't this kind of tempera. It's tempera poster paint, and it's designed to be temporary and washable. The only way you'd have to worry about washing out real tempera paint, which is usually made with egg yolks, would be if you wandered into the studio of an artist who uses it, and there aren't very many of those.
As with most materials, tempera stains are easier to remove when they are fresh. Because tempera poster paint is designed to be washable, you should be able to remove it with
Blot away any fresh paint, using an absorbent cloth or a paper towel.
Treat the stain with liquid laundry detergent. Spread the detergent liberally on the fabric, let it sit for an hour, then rinse it off.
Mix a dilute solution of color-safe bleach and soak the fabric. If the garment is made from a colorfast fabric, soak it in a solution of 3 tablespoons of chlorine bleach per gallon of water. Leave the garment in the bleach solution and check it after 15 minutes. If the stain is still there, you won't be able to bleach it out.
Use a commercial color remover according to the instruction on the package. This treatment will probably alter the color of the entire fabric and won't work with synthetic fabrics, such as polyester.