There are two methods:
Method #1) Soak the beans in cold water over night. Make sure they are completely covered with water. They soak up the water, so put a good 4 inches or so of water above the beans. The next day, drain, rinse, cover with cold water in a sauce pan, bring to a boil and reduce to a simmer. They will take anywhere from 30 min to 1 hour to cook, depending on the size of the bean and the type of bean.
Method #2) Cover the beans with cold water in a sauce pan. Bring to a rolling boil and shut the heat off. Cover the pan with a lid for an hour or longer. Drain, rinse and start over again. Cover with cold water, bring to a boil, reduce to a simmer. They will take 30 min to 1 hour to cook. This method is called the "forcing" method.
edit: If you just boil them without using these methods, they take FOREVER to cook. Like 3 hours or longer. Plus, both of these methods reduce the risk of flatulence. Lentils and split peas do not need to be cooked using these methods. They can be boiled without soaking and they do not take long until they are tender.