The Rambam in Hilchos Teshuvah 2:9 writes:
הַחוֹטֵא לַחֲבֵרוֹ וּמֵת חֲבֵרוֹ קֹדֶם שֶׁיְּבַקֵּשׁ מְחִילָה מֵבִיא עֲשָׂרָה בְּנֵי אָדָם וּמַעֲמִידָן עַל קִבְרוֹ וְיֹאמַר בִּפְנֵיהֶם חָטָאתִי לַה' אֱלֹהֵי יִשְׂרָאֵל וְלִפְלוֹנִי זֶה שֶׁכָּךְ וְכָךְ עָשִׂיתִי לוֹ.
One who committed a sin against his friend, and the friend died before he asked his forgiveness, should bring ten adults at his grave and there say: "I have sinned against the Lord God of Israel and against this person, and I have done against him such and such."
However, in a scenario where the deceased person has no grave-- ex: if a non-observant person was cremated, or the person's body was never recovered etc-- what should/can be done instead?