This is from Beth's Common Treatments FAQ: Garlic is a plant with its primary ingredient, allicin, identified, at least anecdotally, as benefiting fish health and even combating certain fungal, viral, bacterial and parasitic pathogens, even serving as a type of homeopathic repellent. Saying that, the hobbyist can not make the mistake of identifying garlic as a cure-all for any fish disease. Rather, if used, it must be considered as a preventative measure, rather than a cure post-disease process; a supplement used to enhance fish health, or in addition to employing other established methods used to address fish diseases.
It is important not to use a processed product: bottled garlic. Instead, the hobbyist should use fresh garlic as identified below. [You need only buy a single garlic glove at a time, not bunches.]
Snap a single glove off of the bud. Peel off the skin. Using a non-porous container, such as a glass or Pyrex dish, and a sharp knife, mince and smash the glove, preserving the juice. Once finely minced and smashed, and the juices have been released from the garlic, quickly add meaty foods, such as fresh homemade fish food, or high-quality frozen fish foods. Lightly mix the food in with the garlic so that the food is saturated, but not swimming in garlic juice. Cover your container, and place the mixture in the refrigerator for 5 mins.
Feed your fish, preferably using a syringe or a turkey baster to ensure that fish receives the garlic supplemented food. You can add a small bit of sea water to this mixture to get the mixture into your delivery syringe.
This should be done 3x a day if you are using garlic medicinally.
Allicin is produced immediately upon mincing the garlic glove and quickly breaks down. That is why marketed bottled garlic is virtually useless and the hobbyist needs to use fresh garlic.