The motion of the comb against your hair remove electrons from the hair and deposits them on the comb. The positively charged hair and negatively charge comb now attract each other due to their opposite charges. You can read about this is any introductory Physics text, the topic is "static electricity". I doubt any harm is done to your hair, the issue is that it may be difficult to get your hair lying perfectly flat because of this attraction. This effect is more pronounced in low humidity.
If you want to see an exaggerated example of this, rub an inflated rubber balloon several times, quickly in the same direction, against your hair. Then bring it back near your hair while observing in a mirror.
Edit: I hesitated adding this because folks on this particular SE are sticklers for references. My source for the following is a workshop I attended at Chico State University circa 1990. This workshop was taught by a couple PhD Physics professors to enrich Physics teachers in electircity and magnetism.
When you dry clothes in a drier, static electricity is generated resulting in "static cling". But the cling that persists after a load is done is only part of the story. Constantly, at least once clothes are sufficiently dry, electrons are being stripped from one type of material by another. These electrons snap back from where they accumulate to where they were removed. This results in microscopic "sparking" that causes an ever-so-sight amount of wear on the cloth. So, the professors went on, the use of fabric softening anti-cling tissues minimizes this and prolongs the life of clothes. My take is that this is subtle and is more likely to be evidenced by the quality of appearance of the surface of a garment after many washings than it prematurely falling apart. I don't know for sure how significant this is, especially if you replenish your wardrobe regularly.
So, this may also apply to hair. But, unlike a particular garment, hair is constantly replenishing itself. (Well, not on my head.) So I seriously doubt this static discharge damages hair to any measurable extent. Perhaps if you were to run a comb through your hair for a couple hours every day you might see an effect. Bottom line for me, I use anti-static tissues, fragrance free; typically I get 20 years of use from my washable items and consider the tissues cheep insurance. But I use plastic combs on what remains of my hair without any worry.