The Chida (Rav Chayim Yosef David Azulai, 1724-1806) mentions that when one visits a grave, before taking leave he should place his left hand on the grave and recite the following verse from the Book of Yeshayahu (26:19): "Yechayu Meitecha, Neveilati Yekumun; Hakitzu Ve'ranenu Shochenei Afar Ki Tal Orot Talecha Ve'eretz Refa'im Tapil" ("Your deceased shall live, let my [nation's] corpses rise; awaken and exult, those who lie in the earth, for your dew [that will restore life to you] is like the dew [that descends upon] fresh earth, and the ground shall spew forth its corpses"). This verse is recited as a prayer that the deceased shall have his life restored at the time of Techiyat Ha'meitim (resurrection). It contains fifteen words, corresponding to the fifteen joints on the human hand – three in each finger. The placement of specifically the left hand upon the grave is in accordance with the teachings of Kabbalah.
Rabbi Yehuda Ha'chasid (Germany, 12th-13th century), in his work Sefer Chasidim, writes (listen to audio for precise citation) that one should not visit the same grave twice in a single day; rather, one should recite all prayers and express all his requests before taking leave initially. Once a person takes leave of the grave, he should not return to visit the grave until the following day.
Summary: One who visits a grave should, before leaving, place his left hand on the grave and recite the verse in Yeshayahu 26:19. After leaving the grave, one should not return to the grave until the following day.