Grow or buy some chillies, such as cayennes or habaneros, both of which have very good flavor along with their heat. You could also use jalapeños, thai chillies, or any other flavorful pepper.
Preheat the oven to 200F, or 95C for those who are metric.
Seriously consider wearing gloves, such as nitrile or latex (if not allergic) when working with chillies, particularly very hot ones, and also consider glasses, as the juice can get in your eyes, and also perhaps a simple particle mask when working with the dust later, and be careful not to touch your lips, face, or eyes until you have washed your hands.
Remove the stems and cut the chillies longwise.
Discard the seeds if you don't like them, though I leave them in.
Bake on a baking sheet for 4 hours: don't forget about them!
Check them to be sure they are very dry. They should feel like hard plastic. If there are any soft spots, put back in to bake for an hour. Repeat until they are totally dry.
I personally leave them in the turned-off oven overnight to be sure they are quite dry before grinding them, as if you grind up slightly wet chillies, they will mold, whereas totally dry chillies, properly stored in a tight glass jar, can last for many years.
Grind the chillies in a spice grinder, blender, or good food processor. Be sure to wash it well afterwards. This phase can generate dust that can be quite hot: avoid breathing it and getting it in your eyes. I would recommend letting the dust settle for a few minutes before opening the container.
Store your homemade amazing chili powder in an airtight glass jar.
Add to food as you would any other dried chili powder, being careful the first time, as it might be hotter than you thought.