It is common upon visiting Jewish cemeteries to see stones and pebbles adorning the tops of some of the tombstones, placed in observance of an ancient Jewish custom.
What is the historical background and meaning of this tradition, and what is the best way to observe it?
The earliest reference to this custom appears in the works of Rabbi Sholom of Neustadt (-1427), one of the leading European Torah authorities of his generation. In his only extant work, he writes that placing a stone atop the tombstone is done to bring honor to the deceased, as it demonstrates to subsequent visitors that this grave had been visited. Numerous latter authorities lend their support for this custom by citing its practice and its accompanying rationale.
Another source for this custom is based upon the following Talmudic statement:
“There are ten things that are harmful to learning… And some say it is also harmful to one’s learning if one reads the writing on a grave.”
This teaching of the Talmud is one of multiple similar exhortations against certain practices that are said to have a detrimental effect on one’s ability to retain the Torah knowledge they have acquired. According to the Arizal, father of modern Kabalah, this is a spiritual phenomenon.
Rabbi Yosef Han of Frankfurt (1570-1637) explains that although the Talmud’s statement applies to text that protrudes from the stone, as opposed to letters that are carved within the stone, it is prudent to place a stone on the tombstone to mitigate any unfavorable result.
An entirely mystical reasoning is also cited according to which the stone is understood as a gesture to the soul to be present while one visits the graveside.
These explanations provide for the following differing customs.
According to the first interpretation, the stone should be placed prior to one’s departure from the cemetery to be left there. The second rationale would seem to require one to place it as soon as one arrives, to avoid any undesired result from reading the text of the gravestone. Whereas accoridng to the final explanation one should place it upon his / her arrival, and remove it once one has departed.
In practice, the common custom is to place a stone immediately upon arrival, and to leave it behind. This satisfies the first two explanations. To satistfy the third position as well, some are accustomed to placing two stones, one that will remain and another that they will remove when leaving.
 Droshos Maharash (reprinted in Jerusalem, 1997, p. 148).
 See Malbushei Tom Tov (by author of Tosfos Yom Tov on Mishnayos, 224:2), Eliyahu Raba (Orach Chayim ibid. 7), Ba’er Hetev (ibid. 8), Kaf Ha-Chayim (Orach Chayim, 581:92, citing Shenei Luchot Ha-Bris), Ta’amei Ha-Minhagim (ch. 1069), and Gesher Ha-Chayim (vol. I, p. 311).
 Horayos, 13b.
 See also Nagid Umetzaveh, vol. II, § Tzivani Mori.
 Yosef Ometz (vol. II, Seder Ha-Limud).
 Sifsei Tzadikim (R. Salman Mutzafi), p. 22.
 See She’elot Uteshuvot Rivevos Efraim 8:53.