Tubercles are skin nodules made of keratin, the same materials as hair, hooves, and fingernails. They are present on species representing at least 15 families of fishes, including even pet goldfish. In many species, tubercles are found only on males during the breeding season and are shed shortly there after. They are often called breeding tubercles for that reason. The main functions for tubercles include species recognition, fighting and defense of spawning territory or nests, and stimulation of breeding females.
For more information, please see “Breeding tubercles and contact organs in fishes: their occurrence, structure, and significance” (Wiley and Collette 1970) and the related Fisheries Blog post: “Top 10 Weirdest Things Found on a Fish’s Head.”