A hostile work environment is one in which the harassment has become so frequent or horrible that the victim’s working conditions are changed for the worse. For there to be a hostile work environment, the harassment has to be aimed at a protected class.
For example, if a supervisor at a tech company frequently makes comments about women being bad at coding, or perhaps sends emails with cartoons making fun of women, then a hostile work environment may exist. If, however, the supervisor is angry and hostile to all of the employees, both men and women, then, even though it is unpleasant, the work environment is not, from a legal perspective, “hostile.”