Terbinafine granules are used to treat fungal infections of the scalp. Terbinafine tablets are used to treat fungal infections of the toenails and fingernails. Terbinafine is in a class of medications called antifungals. It works by stopping the growth of fungi.