There are many different kinds of lentils, each of which have unique properties when cooked. Some lentils, like French lentils, will hold their shape very well when cooked. Most whole lentils will actually hold up fairly well unless severely overcooked. Frequently for the dishes with a more homogenous texture, split lentils (frequently masoor dal) are used. In addition to being split, the seed coat of the lentils has been removed, so if they are cooked thoroughly there isn't really anything holding them together.
Usually they are just simmered in a liquid until tender. The seasonings are up to your personal taste, or the recipe you are using. The one advice that I would give is to taste as you go. If you want the lentils to remain whole, be sure to avoid overcooking them. Conversely, if you want a smooth texture, cook them until completely tender.
Also, a lot of the dishes that you refer to as having a blended texture may in fact be blended.