Place the dried pinto beans in a large bowl. Cover with 2 to 3 inches of cold water. Soak on the counter for 8 to 24 hours.
Drain and rinse the soaked beans. Transfer them to a medium Dutch oven and add 4 cups of cold water.
Stir in the diced onion, minced garlic, bay leaves, and olive oil.
Bring the mixture to a boil over medium high heat. Skim off any foam that rises to the surface.
Reduce the heat to medium low and simmer gently, uncovered, for 1½ to 2 hours. Stir occasionally and add more water as needed to keep the beans covered.
During the last 10 minutes of cooking, stir in the kosher salt.
When the beans are tender but still holding their shape, remove from heat. Discard the bay leaves. Taste and adjust salt if needed.
Serve warm or at room temperature.