Garlic is the tradional ward against vampires, evil spirits, and sickness. It is also a vampire's least favorite food because (though not used highly in BTVS) it is something like poison to them. The presence of garlic in a room is bothersome, but not the same level of annoyingness as a cross or sunlight. In theory, a garlic laced arrow or bullet or any sharp object would cause a vampire extreme pain and possibly death. Ingestion is another possible route for a fatality, though what exactly would happen cannot be explained since it has yet to be shown on BTVS.