When spills occur, wipe your tablecloth with a sponge or cloth and soapy water--dishwashing detergent does fine. If the spill is greasy (think pasta sauce), try to clean it up right away so there's less chance of staining.
If a greasy stain persists, rub undiluted liquid dish detergent right into the spot. If the tablecloth is white, rub bleach onto the stain.
Read the manufacturer's directions. If your tablecloth is washable, put it in your washing machine at the recommended temperature. (Some people wash their tablecloth in a laundry bag to protect it.) If directions permit, put the tablecloth in the dryer, too, but be sure to use the "cool" setting.