Soak the beans overnight or for at least 8 hours. Drain them and place them in a pot to either cook on the hob over low heat or in an ovenproof casserole dish to bake in the oven. After placing the beans in the pot, add enough stock or water to cover them.
Gently sauté the garlic and onion in olive oil until slightly transparent, about 5 minutes, and then add to the pot. Also add the herb of choice. Cook the beans for about 2 hours (check them for doneness), either on the hob or in the oven.
Season with salt and pepper towards the end of the cooking time. Remove from the heat and let the beans stand, covered, for 30 minutes so that they can absorb any excess liquid.
The beans can be served whole or pureed to the desired consistency. Serve with crostini or bruschetta.