Add onions to pan and cook for 3-5 minutes, about when the oil starts sizzling. It is best to slice the onions quite thickly to prevent burning, and because they will reduce significantly in size while caramelizing.
After the 3-5 minutes on medium heat, reduce heat to low and cook for 60 minutes, stirring every 5-10 minutes.
Deglaze the pan by adding 1 tablespoon of water to lift all the flavorful bits from the pan onto the onions.
Recipe by Rachel Schultz at https://rachelschultz.com/2016/04/13/how-to-caramelize-onions/