Dice your onion if you are planning to use them mixed into recipes. Slice your onions if you are planning to use them on a burger or something you want large onions for.
Add the oil and onions to the cast iron pan. Add salt to taste. You are cooking the onions for a long time so not need to wait for the pan to heat up.
Cook over medium heat for 60-90 minutes. The amount of time it will take depends on the moisture content of the onion. You could even go lower if your stove top runs hot. You want them to just be barely cooking so that the onions break down slowly and gets brown.
Stirring the onions every once in a while. If they seem too dry, add a little more oil.
Once the onions look completely solid brown, they are done. They should be the same color brown all the way around.
Use immediately in a recipe or store in the fridge for 5 days or freeze for 6 months.