I think Fr. Z’s got something on it.
wdtprs.com/blog/2014/10/action-item-all-souls-day-indulgences/
In summary, according to him (I just obtained the Manual of Indulgences and have not read anything about cemeteries…) visiting a cemetery between Nov 1 and 8 can result in a plenary indulgence (or partial if conditions are not met for plenary).
The norms for acquiring a plenary indulgence are usually:
reception of Holy Communion (one Communion to one plenary indulgence)
reconciliation within 20 days before or after the indulgenced act
being in a state of grace (no unconfessed mortal sin)
praying for the intentions of the Pope (suffices: 1 Our Father, 1 Hail Mary, 1 Glory Be)
freedom from attachment to all sin, venial or mortal
If these conditions are not met, the plenary indulgence is instead partial. One plenary indulgence per day. Since satisfaction can be applied to others, and indulgences are a special type of satisfaction, they can be applied to the souls of Purgatory or to the one performing the act (other acts of satisfaction that are not indulgences can even be applied to the living, I believe, according to St. Thomas Aquinas).
This special type of indulgence, that of the cemetery visit, is only applicable to the souls of the dead. You’re better off that way, anyways:
newadvent.org/cathen/07292b.htm
Oops. I didn’t include anything else. Really, it should be a pious visit to the cemetery with the intent of obtaining the indulgence (at least an implied intent, not necessarily that you utter it every time you do an indulgenced act).
You would benefit by including a few prayers. Eternal Rest is great. “Eternal rest grant unto them (him/her), and let perpetual light shine upon them. May they rest in peace. Amen.” I often go to the cemetery to pray for the souls therein, and I think according to Father Z it is partially indulgenced when you do this outside of Nov 1 to 8.