The tractate of Avodah Zarah (lit. idolatry) discusses all laws relating to idolatry as well as many laws regulating the interaction between Jews and non-Jews. The conclusion of the tractate details the laws that are germane when a Jew purchases food utensils from a non-Jew. Such utensils are presumed to be non-kosher, and must be koshered before use. The method of koshering depends on the type of utensil and its use.

Quote from the Mishnah: "The knife must be buffed and then it is pure."

Rabbi Ukva bar Chama said: In addition to buffing, he must thrust it into the ground ten times.

Rabbi Huna the son of Rabbi Joshua added: In ground that is not tilled.

Rabbi Kahana added: This only applies to a smooth knife, one that has no nicks. (If the knife is nicked then non-kosher substances lodges in the niches will not be removed by the buffing and thrusting.)

Indeed, we learned as such in a beraisa:1 A smooth knife that has no nicks, one thrusts it in the ground ten times.

Rabbi Huna the son of Rabbi Joshua said: This all applies if one only uses the knife on cold foods. (If one wishes to cut hot foods with the knife, it must be koshered through immersion in boiling water.)

A story on this topic:

Mar Judah and Bati bar Tovi were sitting before the gentile king Shvor Malka.2 An esrog was brought to the king. He cut a piece and ate it. He cut another piece and gave it to Bati bar Tovi. He then took the knife, thrust it into the ground ten times, cut another piece and gave it to Mar Judah.

"And am I not Jewish?" asked Bati bar Tovi.

"I am certain that he is observant of Jewish law; I am not certain regarding you," the king responded.

There are those who say that the king responded as such: "Recall that which you did last night..."

(According to the Persian rule of hospitality, the king sent a slave-girl to each of them the night before. Mar Judah refused to receive the maid that was dispatched to him; Bati did not.)