If your beans are particularly old or you're using garbanzo beans which are very hard, you'll want to soak them overnight in a pot covered by 2 inches of water. Otherwise, they will take a very long time to cook. If your beans are fresh, coming from a store where you know the bulk bins have a lot of turnover or you've recently ordered your beans from a specialty bean store like Rancho Gordo that doesn't sell beans over 2 years old, you can skip soaking your beans.
Rinse beans (soaked or unsoaked) and discard any debris. In a 2 quart saucepot or small dutch oven, combine beans, onion, garlic, bay leaves, herbs, olive oil, lemon zest, and parmesan rind if using. Season with pepper but do not add salt. Cover the beans with 2 inches of water. If you are cooking chickpeas, which are very hard, add a pinch of baking soda. This helps to make the chickpeas soft, but will make other types of beans fall apart.
On the stove, bring the uncovered beans to a rolling boil. Then, turn the heat down and simmer the beans until done, between 1-4 hours depending on size, stirring occasionally and adding more water if necessary. When beans are al dente, season with salt.
Discard the bay leaves, herbs, parmesan rind, and any intact onion or garlic. Store the beans in the broth until ready to use. Use these beans as you would in any recipe requiring canned beans.