Cheesecloth is a loosely woven material made from cotton. It's mainly used to remove the whey from the curds during the cheese-making process. However, modern cooks also use it for a wide variety of other purposes, from straining custards to making tofu. If a recipe calls for the use of a cheesecloth and you don't have one around, you'll need to find a substitute material.
Any cloth with a similar weave to cheesecloth will produce the same effect as cheesecloth. You might try clean handkerchiefs --- if they're new, wash and dry before use --- pantyhose or flour sacks. Some people also swear by cloth diapers as a substitute, but make sure they are new and washed before use. When choosing a substitute cloth, consider whether the recipe calls for fine cheesecloth --- that is, the type used for softening cheeses and butter --- or a coarse cheesecloth --- in other words, the kind used for draining curd and cheese pressing.
Some paper products may fill in for a cheesecloth just fine. Perhaps the most widely used paper substitute for cheesecloth is coffee filter paper. You can simply use a clean coffee filter exactly the same way you'd use the cheesecloth. The only limitation of this strategy is that coffee filters come in a very limited number of sizes, so you might be unable to find a coffee filter that is large enough for your specific purpose. In some cases, a sturdy paper towel will also do the trick.
A very fine metal strainer can do in a pinch, particularly when cheesecloth is needed to strain out lumps from custard or to strain out herbs from a broth. If your recipe calls for a fine cheesecloth, however, a strainer likely will not do, no matter how fine the metal fibres are. Keep in mind that if you have a small strainer, it may take significantly longer to strain your food material because you'll have to work in small batches.
Hunting Down Cheesecloth
It only makes sense that you'd be able to pick up cheesecloth in the same place you pick up the other necessities for making a recipe. However, not all grocery stores sell cheesecloth. If your local grocery store doesn't carry cheesecloth, you don't necessarily have to start thinking about what you have at home that will work as a substitute. You can find cheesecloth at most fabric stores and even some arts and crafts stores.