Soak beans overnight or perform a quick soak by putting beans in a large pot and covering with water 1 inch higher than the level of beans. Bring to a boil then turn off heat and let sit one hour.
Drain the water from soaked or canned beans.
In a large stock pot, heat the oil, onions and garlic over medium heat and cook until onions are translucent, about 5 minutes.
Add softened beans, ham bone and 3 quarts of water. Bring to a boil then simmer for 1-2 hours until beans are very soft.
Remove ham bone. Remove meat from bone and chop into small bits.
Using a hand blender puree the beans until smooth adding additional water if too thick.
If you don't have a hand blender you can pour the beans and water into a blender or food processor and puree in batches.
Add ham to pureed beans and serve.