Step 1: Prep pork
Sprinkle the pork with salt and pepper, chili powder, cajun spice, or the seasoning of your choice.
Put it in the oven at 400F for approximately 45 minutes to an hour, and remove when it reaches an internal temperature of ~140-145F* on your instant-read meat thermometer.
*Note: the USDA recommends 160F, but this produces a painfully dry bit of pork (especially with today's leaner pork) and is overkill, according to Cook's Illustrated. The Pork Board recommends 150F, which also turns out dry. Trichinosis is killed at 137F, so we're into the safe zone. The internal temperature will rise 5-10 degrees as the meat rests to redistribute the juices, covered, after cooking.
Step 2: Prep apples and onions
Chop 2 purple onions and enough apples to fill the pork's roasting pan, and mix in a large bowl. Add a bit of olive oil, chili powder, salt and pepper. You can also add some parsley, fresh nutmeg, allspice, chopped garlic, or ginger depending on your taste. (Don't even think of peeling the apples- it takes far too long, and isn't worth it. Just remove the seeds and chop them coarsely.)
Toss the apple/onion mixture and let it sit while the pork cooks.
Step 3: Roast apples and onions
Dump the apple/onion mix into the pan and stir to incorporate the meat juices. Return the pan to the oven at 400F, and cook for approximately 20 minutes.
Remove the pan, add about 1/3c madeira (or sherry, brandy, port, or other sweet alcoholic beverage), and stir. Replace the pan and cook for another 20 minutes.
At this point the liquid should be largely evaporated, the onions should be meltingly soft, and the apples just about to collapse. Stir it around to make sure you're happy with the texture; if not cook a bit longer.
Give it a quick minute under the broiler to brown the top tips, and it's done.
Step 4: Serve
Serve warm, covered in the apple/onion mixture.
This is a proper autumn dish, and extremely good in cold weather. Serve the pork with some nice green vegetable to balance out the color scheme and make dinner look healthier.