कण्टक means a thorn and विद्ध means pierced. A person with a thorn pierced in his leg is called कण्टकविद्ध A person remains unhappy so long the thorn that pierced in his leg (is not removed) does not come out. In this situation the thorn needs to be pulled out. It is a fact that to remove to pull out thorn from a leg another thorn proves useful. This "Nyaya' is conceptualised on this idea.
This Nyaya advises / preaches that anything that causes pain may prove to be to remove, to get rid off that pain. A person should always plans his daily activities following this advice. For example, iron is a very strong metal but to cut it iron itself remains very useful. To avert the effect of poison of snake medicine is prepared out of snake-poison only. Thus the source of misery itself help to avoid or to remove misery.
Over and above this 'Nyaya' also preaches some other things also. The thorn which has the capacity to damage can also prove beneficial. Poison that has the capacity to end life has the capacity to protect / save life. So, a person must never act foolishly to destroy something believing, feeling that it causes him misery or some damage.