How can someone apologize to a person who’s already dead?
Shalom, Thank you for your question. The technical answer to your question is found the in Shulchan Aruch (Orach Haim 606,2) "If the person one sinned against is dead, one brings ten people to stand at the grave and says "I sinned to the L-rd of Israel, and to So-and-so, whom I sinned against"". The Mishna Brurah adds some technical information, such as removing one's shoes and possibility of sending a proxy if the grave is too far away. There is a deeper aspect to your question, which is whether the dead need our apology or not? Firstly we believe that the soul of the departed has an existence beyond this world, and as such it can accept our apology. But more than this, a major reason for apologizing is to bring the sinner to a place to repentance. The inner process of asking for forgiveness helps the sinner rebuild their soul after the damage of the sin has occured. In this respect the act of turning even to the dead will help bring about to repentance that perhaps cannot be attained in any other way. Blessings.