Red pepper flakes are best known as a topping for pizza and other Italian dishes, especially in the US; however, they are versatile and have numerous other applications. You can find them in the Mexican foods aisle of many grocery stores as well as in the spice aisle. They are an excellent way to add heat to dishes and have a long shelf life since the peppers used to make the flakes are dried. Because of how useful this spice is, you should try to keep some in your spice cabinet at all time. If you run out, there are several red pepper flake substitutes that you can try.
Your best bet: Make your own
Red pepper flakes are not anything more than coarsely ground dried chili peppers. To make your own, you simply need access to whole dried chilies that are moderately hot. These can be found in Latin American grocery stores as well as in the Mexican foods section of many conventional grocery stores. Examples include ancho and guajillo chilies.
If you have these on hand, simply tear or cut the chiles into large pieces that can easily fit in your spice grinder or place them in a blender. Pulse for a few seconds and you will likely wind up with a blend of finer and larger pieces, Simply remove the larger pieces and use the smaller ones as your red pepper flakes substitute.
If you want to take an even more serious DIY route, you can dry your own peppers in a food dehydrator and prepare them as noted above. If you are drying your own, the best (and easiest to find) peppers are jalapeños but serranos and Anaheim chilies can be used as well. Note that the Anaheim chiles will result in an extremely mild blend.
A decent second choice: Cayenne pepper
Cayenne pepper is from the same family as the peppers that are most commonly used to make red pepper flakes. This means that any dish made with cayenne pepper will likely have a similar heat level as a dish with an equivalent amount of red pepper flakes. Another benefit is that cayenne pepper is easy to find. One drawback is that cayenne pepper is typically powdered, which means that it will present a different appearance than red pepper flakes. Note also that cayenne pepper will most likely be hotter than most red pepper flakes, as the flakes are usually on the milder end of the heat spectrum.
Gochugaru is the Korean version of red pepper flakes and is almost identical to the western version except in one aspect: it has no seeds. Gochugaru is responsible for the spiciness of kimchi; in fact, Korean cooks suggest that you accept no substitutes when making homemade kimchi. Despite the fact that the peppers used to make gochugaru are cultivated in Korea, they are (like all chili peppers) Central American in origin. Note that while the absence of seeds might seem ideal for some applications, it will definitely make a big difference in terms of appearance. Gochugaru tends to be milder than standard red pepper flakes.
You can use fresh red chili peppers as an alternative to red pepper flakes in many applications, but they might be less than ideal in others. Of course, you will have to chop them finely to get the texture similar to that of the flakes. Use fresh chili peppers in dishes where the extra bulk and moisture will not make a big difference.