Do is a noun from the verb "to do":
Hair do = noun + noun, thus "hair do" = A do associated with hair.
The noun and verb "do" are usually only understandable from the context but, broadly they represent some sort of action.
"I'm going to have my hair done tomorrow."
"She did her hair in a ponytail"
"Her usual hair-do is a ponytail."
Thus "do" is a utility word that, in this context, is equivalent to "to arrange/style" or "an arrangement/a style".
The following are some examples from OED to give the idea:
Do (n.) 1. a. The action of doing, or that which is done; action, business.
1988 J. Cartwright Interior viii. 90 Dreadful gas-bag... All talk and no do.
1. b. Originally English regional and nonstandard. A social event, a party; a performance or show.
1999 M. Syal Life isn't All Ha Ha Hee Hee (2000) ii. 60 Red Box are having a do upstairs... You ought to call in.
1.c. Originally English regional (northern). With modifying word. An affair, occurrence, experience, or situation (of the kind specified).
1992 G. M. Fraser Quartered Safe out Here 160 I was startled to hear Grandarse..say in a grim harsh voice: ‘It's a bad do. By Christ, it's a bad do!’