A purple tang (Zebrasoma xanthurum) with a milder case of HLLE
Head and lateral line erosion is still mostly a mystery in the aquarium community. It's hard to say what exactly causes it, all that is known is that it is only found in captive fish, not wild fish. While there are some theories of what causes it, what is known is that it isn't life threatening unless a secondary infection occurs. Less severe cases can be recovered from fully, while more severe cases might leave the fish permanently scarred, but otherwise healthy. One possible causative agent appears to be activated carbon that is sometimes used in aquarium filters as a means of reducing heavy metal pollutants among other noxious chemicals. Other proposed causes are stray voltage from aquarium appliances, improper nutrition or vitamin deficiency, and copper exposure at levels used to treat fish. Hexamita is often thought of as a causative pathogen in the absence of other potential causes. In freshwater, and among some aquarists, HLLE is referred to hole in the head, but they are synonymous.
HLLE can be difficult to spot in its beginning stages. Because it is erosion of the fish's skin/scales, it starts as small pock marks on the fish's head and lateral line which grow as the condition progresses. It can appear different in freshwater, as pictured in the oscar cichlid, as HLLE focuses more on the head than the lateral line.
Identifying the cause of HLLE and correcting the issue is the first step. Activated carbon should be removed from the system. Just do some more water changes if you're worried about not having activated carbon. Grabbing a voltmeter and testing for stray voltage is quick, but effective. Tangs are really easy to give improper food to, as although they are more herbivorous, they still prefer more meaty foods. However, their primary diet consists of plant matter, and nori/seaweed should be offered in abundance to them, especially if algae is sparce in the tank. The same can be true for other fish, as they are mostly omnivores. It's really easy to just feed cichlids meaty foods, but they do require some sort of plant matter to give them the proper vitamins and micronutrients. If treating with copper, the fish will usually heal up following treatment. If there is no other immediate cause, treating for hexamita can help the fish turn around.
If caught early, a fish will generally be able to heal from HLLE without any long-lasting effects. However, if not caught soon enough, or if you don't fix the problem soon, HLLE will permanently disfigure your fish. Although it is only cosmetic, it can lead to secondary infections when the erosion is bad enough, which can spell disaster for your fish.
An oscar cichlid (Astronotus ocellatus) with advanced hole in the head