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.