There are literally hundreds if not thousands of different types of nematodes which live in the soil and affect many different lifeforms. Scientists in the past few decades have been studying these organisms and have made great headway in understanding them. Many are beneficial and attack and kill harmful entities in the soil. Others like the root knot nematode attack the roots of different types of plants, and for us gardeners tomatoes are the biggest worry. Scientists are able now to separate and commercially grow nematodes that are selective in what they attack.
Here in the US there are businesses that grow and sell them commercially and you can purchase them according to what you have in your landscape or garden that you want to get rid of such as ants, slugs, snails, grubs of all types and insects such as fleas, ticks and their eggs, just about anything that lives and reproduces in the soil. Interestingly, they do not harm beneficials such as earthworms.
Nematodes come in two forms, dried and live. I have tried both and in my experience the dried form is worthless whereas the live forms are extremely effective. Most real garden centers here in the US have them. They come refrigerated on a little blue sponge. The smallest amount you can buy is 1 million which is enough for about 1/4 acre. You put them out with a hand held sprayer onto damp ground and then lightly water them in. They move about on microscopically thin layers of water in the soil. Their normal live span is about 6-8 weeks unless they find a host to live and reproduce in, which will perpetuate their numbers in the soil. When their food runs out they die. These things really work and they are not expensive. I bought a million last year and they costs $13. Previous years they were about $10. They are also dated on the sponge. If they are over 2 weeks old they have probably begun to die so make sure they are fresh and properly refrigerated before purchase