Begin by measuring the beans: 1 cup dry expands to about 2 cups when cooked, enough for 4-6 servings. Next, remove any pieces of dirt or rocks (easier to find if the beans are spread out over a large flat surface such as a cutting board or cookie sheet). Then rinse the beans in one or two changes of water (it is not necessary to keep rinsing red lentils and green and yellow split peas until there is no more foam in the rinse water). Cook the beans in a covered pot in 2 cups water per cup of beans and, if desired, add 1/4-1/2 teaspoon salt per cup of beans when they are tender. The cooking times, depending on the type of bean, range from about 20 to 90 minutes.
With some advance planning, the cooking times for the slower beans (usually the larger ones, such as garbanzo, navy, pinto, black, kidney, and soy) can be cut by 1/3 to 1/2 (saving energy too) by soaking them in water for about 8 hours before cooking (You do not have to soak the faster beans, such as lentils, split peas, black eyed peas, mung, and adzuki).
Soaking can be viewed as "cooking" in cold water (somewhat like low-temperature fusion, except this works): measure, sort, and rinse the beans as described above, and then put them in a container with the same amount of water (2 cups per cup of beans) as they would be cooked in. As they soak, they will absorb a portion of the water and expand. The effect of soaking begins after a few hours and seems to reach a plateau after 8-12 hours, although it doesn't hurt to soak beans for up to 24 hours. If not yet cooked by that time, place the container in the refrigerator or the beans may begin to sprout, especially if your kitchen is warm.
If you have less than several hours, you can speed the process by soaking in hot rather than cold water: Bring the beans and soaking water to a boil in a covered pot and then turn off the heat, letting them soak until they need to be cooked.
To cook beans, bring them to a gentle boil in a covered pot, either in fresh water (if starting with dry beans) or their soaking water (some cooks claim replacing the soaking water with fresh results in less gas). Stir the beans and check the water level occasionally.
Most soaked and fast-cooking beans will be tender by the time they have absorbed their cooking water. Unsoaked slow beans may need added water, about 1/4 to 1/2 cups per cup of beans, to replace the water lost as steam during the longer cooking process. Red and brown lentils are tender after about 20 and 40 minutes respectively. Split peas, mung and adzuki beans, and black eyed peas, take about 45-60 minutes. The other common beans (unsoaked) cook in an hour or more. Soy beans take the longest.
Red lentils and split peas break apart and turn to mush as they cook. Brown lentils, black eyed peas, and mung and adzuki beans begin to break apart about the time they are tender. Most other beans hold together unless overcooked and/or overstirred.
To get the most flavor possible from the beans, avoid draining off any cooking liquid. If they are nearly tender and there is still quite a lot of liquid left in the pot (they will absorb a little as they cool), remove the lid and turn up the heat to boil it off. Another way to reclaim the flavor is to thicken the liquid with arrowroot, cornstarch, or flour (so it sticks to the beans) or by mashing a portion of the beans.
Three final points. First, acidic ingredients such as vinegar, wine, tomatoes, and citrus fruits and their juices, should be added only after the beans are tender, because they slow the cooking process. Second, if your beans do not seem to be getting tender, even after a considerable amount of cooking, they may be old (I know of no remedy for this situation). Third, if you are interested in sampling some beans, try brown or red lentils, black eyed peas, garbanzo, pinto, or mung beans. Freshly cooked, with nothing more than salt added, they are all very tasty.