It is possible to caramelized onions by cooking them slowly in hot fat. Either butter or olive oil, or a combination of the two, can be used to saute the sliced onions.
Two medium yellow onions make about 1 cup of caramelized onions. Use approximately 1 teaspoon to one tablespoon of butter or oil per onion. Heat the butter or oil in a large frying pan over medium-low heat. Add the thinly sliced onions. Cook until the onions are a deep golden brown color, approximately 45 to 60 minutes, stirring occasionally so that the onions brown but do not burn. Some recipes call for enhancing the caramelization by adding approximately 1/4 teaspoon of sugar per onion. Season with salt and pepper.