The art of cooking lentils varies with the type of lentil you wish to cook, but the steps are relatively easy. There are a number of varieties of lentils, and a number of sub-varieties of those. Lentils fall into green or brown (most commonly found in standard American grocery stores), red, black, and a number of other varieties. Usually, at least what I have seen in the United States, the green or brown lentils still have their skins intact. Red lentils commonly come in skinless and skinned. I do not use black or other types of lentils at this time, so I cannot comment on them. I prefer lentils with skins on, not only because of the greater fiber content, but also I find lentils without skins, especially red lentils, can turn mushy rapidly unless you are very careful during cooking.
One of the most important steps of cooking lentils is sorting. Lentils are notorious for containing rocks, clumps of dirt, twigs, wheat grains, and other extraneous material. While I worry less about dirt and wheat grains, it is the rocks that can really damage teeth if you bite down on them unexpectedly. I discover less foreign material in red lentils, likely because the debris is easier to spot by the processing factory, and is removed more efficiently. Green lentils contain more debris, and the amount seems to depend upon the lot and also the brand. Take the time to sort through your lentils in small handfuls to prevent unhappy visits to the dentist.
The second most important step is to rinse the lentils with cold water. This will help prevent breakdown during the cooking process. This is especially true for skinless red lentils. Rinse these until the water is no longer cloudy. This could take five minutes or more of rinsing. Green lentils do not require much rinsing. Also, I do not find it necessary to soak lentils before they are cooked.
The third important step to good lentils is the cooking itself. Do not cook lentils with salt or acidic ingredients like tomatoes, at least not until they are near desired tenderness. This could seem contrary to what seems best in terms of taste, but it will result in better lentils that cook more rapidly. This is especially true with lentils that tend to naturally hold their form well during cooking like the French green (puy) lentil variety. Salt can cause lentils to not cook to desired tenderness, and they possibly could never cook exactly to desired tenderness. I do not use much salt in my cooking anyway, but I definitely never add salt to the water in which I cook lentils. Again, your common green lentil is less affected.
The last important consideration to cook lentils properly is to not boil them excessively. Rigorous boiling can cause lentils to break apart and result in mush. This does not happen often with green lentils, but is especially a problem with skinless red lentils. Nevertheless, I use the same boiling process for all my lentils, regardless of the type or variant. Generally, I put the lentils in a saucepan and cover with at least a couple inches of water over the surface of the lentils. I start on high just to heat up the water more rapidly. Just as the light bubbling of the boiling occurs, I turn down the heat to low. The key is to always maintain a low simmer, and never transition to a rolling boil. I cook lentils uncovered so that I can view and control the level of boiling. Because I use my lentils in other recipes, I cook until they are al dente. If you do not plan to cook them within another recipe, then they can be cooked until desired tenderness for direct eating. The length of time will vary with the type and variant of lentil used, but generally is in the 15 to 30 minute range. Puy lentils take longer to cook than common green or brown lentils, and red skinless lentils cook rapidly.
While I am far from an expert in lentils, these are my experiences with cooking the varieties I tried so far. If you have additional suggestions, please feel free to share them.