Adding salt or acidic ingredients early in the cooking process, before the lentils are tender, can cause them to not cook properly. Wait to add these seasonings until after they are soft. Also, it's possible to get an old batch of dried lentils that just refuse to soften no matter how long you cook them. Do not eat undercooked lentils as they can cause digestive issues.