There are a number of prayers that you can say when visiting a cemetery, praying for the repose of the souls of your loved ones.
When visiting a grave, it is most appropriate to say a short prayer at the cemetery, asking God to grant eternal rest to your loved ones.
The most common prayer at a cemetery is the "Eternal Rest" prayer.
You can also pray the prayer of St. Gertrude for the souls in purgatory.
A simple Hail Mary or even a Rosary could be prayed at a cemetery as well.
There is no "right" prayer to pray at a cemetery. The key is to pray for the repose of souls, and to ask God to have mercy on them.
Read also :Catholic prayer for Memorial Day
Read also :Catholic prayer while visiting a cemetery