Peel and halve the onions. Slice the onions about ¼-inch thick.
Heat the oil or butter or a combination in a very large skillet over medium heat. When the oil is hot, add the onions. Season with salt and pepper, if desired. Cook, stirring occasionally, for about 30 minutes. Make sure the onions aren’t burning, but that they are getting darker. If needed, add a couple of tablespoons of water, if the onions seem to be sticking. See above for more tips on how to caramelize onions evenly.
After 30 minutes, sprinkle over the sugar, if using. Either way, continue to stir and cook for another 15 to 20 more minutes, until the onions are as browned and soft as you like them. Taste and adjust the seasonings as needed. Remove from the heat and use.
Notes
What Kind of Onions Are Best for Caramelizing
You can use any onions for caramelizing, red, yellow, white, sweet varieties all work. If you are using sweet onions, like Vidalia, which are already sweeter than your basic yellow or red onions, then you can skip the optional sugar.