I remember hearing that a knife can be kashered (from being treif) by sticking it in the ground. But I also know you can use the traditional kashering methods - Hag'ala (completely submerging the utensil in boiling water) and Libun (kashering something via heating to a high temperature).
I have 2 questions:
1) What is the logic behind the method of sticking the knife in the ground?
2) When is each method applied?