Rough chop your onion or slice it in rings, then cut the rings in half. Here, I've only done about half an onion, since I only wanted enough for my mac&cheese.
Put your frying pan over medium heat, with enough olive oil to coat the bottom of the pan. Probably less than a Tablespoon. Add your onions and cook until translucent, about 5 minutes.
When your onions are translucent (see picture), reduce heat to very low, make sure they are in an even layer, set your timer for 15 minutes . . . and walk away. DO NOT STIR for 15 minutes.
After about 15 minutes, give 'em a good stir, try to get the whites sides down and the brown up, set your timer for 15 minutes and walk away again.
After another 15 minutes, repeat your stir process. They should be beginning to get some caramelization now (see picture). Set your timer for 15, and walk away.
At 45 minutes, they should be fairly brown (see picture). This is where you'd stop if you were The Physicist. It's actually where he asked me to stop. And sure, if you like your onions just caramelized, without blackness or crispy bits, then this is when you should take your onions off the heat.
But if you like the taste of carbon, stir and set your timer for another 10 minutes.
This (see picture) is how I like my caramelized onions. I like 'em black and crispy, I think they add loads more flavor this way.
At this point, you can add them to your recipe, sprinkle them on a salad or meat, or let them cool to room temp and store them in an air tight container for use later in the week.