Put the beans in a large pot and cover with the water. Boil until the beans are tender but not mushy. This could take anywhere from 5 to 15 minutes, depending on the freshness of the beans.
In a skillet, heat the oil until it is hot (but not smoking) and then saute the onion and garlic. Add the cayenne, cumin and salt. Cook until the onion has softened, about 5 minutes, stirring occasionally.
Add the onion and garlic mixture to the beans and bring to a boil. Reduce the heat and simmer for about 30 minutes.