Cornstarch is used to thicken liquids in a variety of recipes such as sauces, gravies, pies, puddings, and stir-fries. It can be replaced with flour, arrowroot, potato starch, tapioca, and even instant mashed potato granules. The ingredient you are most likely to have on hand, of course, is flour, so we'll start with that.
When you want 1 cup of liquid to be fairly thick, it takes 1 tablespoon of cornstarch. (A stir-fry sauce might use only 1-2 teaspoons per cup of liquid). It will take about 3 tablespoons of flour to replace 1 tablespoon of cornstarch, and you will need to cook the sauce for much longer to get rid of the raw flavor of the flour. Flour is a very stable thickener, but will not result in the same glossy shine that cornstarch produces.
Arrowroot, on the other hand, makes a beautifully shiny sauce and may be substituted in an equal or slightly greater amount, but will need to be cooked a little longer than cornstarch.
For other substitutes like potato flakes or granules, tapioca and rice starch, 2 teaspoons will likely thicken about as much as 1 tablespoon of cornstarch.
For more information on ingredient substitutions, see our Ingredient Substitutions guide.