http://revach.net/article.php?id=4670

Section: Hanhagos   Category: Minhagim
Going To The Bais HaKvaros On Tisha B'Av
The Rema (OC 559:10) says that on Tisha B'Av right after davening there is a minhag to go to the Bais HaKvaros.  The Mishna Brura says that at the Bais HaKvaros you should stay four amos away from the actual grave so that the Koach HaTumah will not attach itself to you.

The source for this worry is the Arizal who said that one should not go to a cemetery unless it is to bury a Mais.  Because of this Arizal, says the Minhag Yisroel Torah, many tzadikim do not go at all to the Bais HaKvaros on Tisha B'av.  

The question is what about the rest of the year, would the Arizal approve of going?  The Nimukei Orach Chaim says that the Arizal's hakpada against going to a cemetery was only on Tisha B'Av.  He proves this because the Arizal says that you should not go twice to the same Kever in one day.  It seems that to go the first time is not a problem.  The reason why Tisha B'av is problematic is because it is a bad day and the Koach HaTumah has more power on Tisha B'av.  Furthermore said the Minchas Elazar, the Arizal surely didn't suggest that one should not to go to Kivrei tzadikim, because that is a Mitzva and no harm can come from it.

The Shaar HaMelech on the other hand takes a different approach and says that the Arizal was against going to the Bais HaKvaros on any day.  However we are only makpid on this on Tisha B'av, since we have no Torah or Tefilin to protect us, we are more vulnerable.  He adds that those who do go, have a minhag to bring garlic cloves and throw it to ward off evil spirits, since garlic stops jealousy (Bava Kama 82a).