If using dry beans, soak them and cook them according to the instructions in the notes section, below.
In a large pot, heat the olive oil over medium low heat, then add the diced onion and sauté or a few minutes until they begin to soften.
Turn the heat up a bit, then add the peppers and continue to sauté for 3-4 minutes.
Add the garlic and stir and cook for another 2 minutes.
Add the beans. If you are using canned, be sure to rinse them well. If you are using homemade, no need to rinse, but don’t add too much of the cooking liquid at this point.
Add the tomatoes and the water. If you are using home-cooked beans, you can use some of your bean water. Add enough water to make the chili the consistency you like, then add a bit more as it will cook down and thicken as it cooks.
Simmer for 30 minutes or so, then turn off the heat and put a cover on it and let it rest for an hour or two (but not long enough for the soup to cool too much).
After an hour or so, uncover it, turn the heat to medium high, and bring it back to a simmer, stirring often to prevent it from sticking.
Add the frozen corn and stir. Cook for another five minutes and serve.