from a 3-second search:
Garlic has many antibacterial and anti-parasitic properties, mostly derivative of its high sulfur content. It can be fed to fish nearly all fish, tropical and coldwater, freshwater, marine, and salt, to cure many parasitic infections, internal external. Internal parasites are inherently hard to treat, because of the difficulty in getting medicines into the intestines, where they occur. Because of this, garlic fed to many aquatic fish can be one of the most effective cures and preventive measures. Garlic is commonly used in non-fish applications as a de-wormer in chickens, cows, and other farm animals. It can be safely fed to fish for such purposes, and can even be used to add fat to a fish’s diet. Its common uses are as follows:
Ich - Garlic has been widely rumored to cure ich, either by strengthening the fish’s slime coat, making the fish’s body undesirable to the parasite, or repelling it from the fish.
Neon Tetra Disease - There is no known cure for neon tetra disease, but because of the lack of a cure, garlic is worth a try, especially for containment. The high sulfur content of garlic inhibits the growth of parasite larvae, preventing them from reaching a stage at which they can feed and effectively starving them. Remember, though, that there is no conclusive evidence to this end.
Worms - Intestinal worms, AKA roundworms or flatworms, can often infect a fish’s body, causing it to waste away. Garlic has been, for all intents and purposes proven to prevent and can usually treat cases of these worms. Many breeders add it to their food mix to prevent the spread of these worms.
Discus - Garlic is very commonly used in discus, for it is an attractant to them, giving them more interest in their food. It is also effective against parasitic nematodes apparently common to discus
Why it Works: Diallyl thiosulfinate, commonly Allicin, is a common pharmaceutical ingredient. It is also present in garlic. This is effective against gram-negative and gram-positive bacteria, much like a maracyn - maracyn-2 combo. Garlic uses a very complex defense system, including Allicin and many other substances that ward off bacteria and fungus. It is this chemical immune system that makes garlic such an attractive food additive. Thoroughly crushing garlic is crucial, as two separate chemicals (alliin and alliinase) must be released upon trauma to garlic. These combine to make allicin.
How to Feed it: Garlic can be administered in several ways. First, a crushed up clove of garlic will most likely be accepted by most omnivorous fish. If the fish does not accept it ground up, (put just a little in to test, fish it out afterward) you can incorporate it into its food in several ways. If you have larger, carnivorous fish like oscars you can mix some freshly mashed garlic into thier beef heart or whatever meat you feed them. For flake and pellet fed fish that don't take it, you can sprinkle the food with some garlic oil. The age of the garlic oil makes it less effective, but it's stil garlic. (hopefully) You can, alternatively, drop finely ground garlic and pellets into a small cup and mix, grind, and shake them together. Then, either pick or strain out the pellets. Labor intensive, yes, but effective. For flakes, breaking a bit off the clove, maybe sqeezeing it slightly, and patting onto the flakes should would. Most of them should stick on. You can scrape them off with your finger over the tank, and then rinse your finger in the tank. There are commercial garlic medications, but i'm inclined to think they're a bit like garlic oil wrapped in silk bows, some expensive French wrapping paper, and one of those yuppy shopping bags that cost more than the items they carry