Heat the oil in a large skillet over medium-high heat. Add the onions, peppers, salt and pepper.
Reduce the heat to medium-low and cook, stirring frequently, until the onions are caramelized and the peppers are tender and slightly browned, 15 to 20 minutes.
If a brown coating forms on the bottom of the pan during the cooking process, add a few tablespoons of water and stir; repeat as necessary.