An allegory is a text that has at least two "layers" of meaning. The first layer is the literal, obvious one; in this case, it is a fictionalized telling of some of the events that took place during the Salem witch trials: a literal witch hunt. The second layer is the metaphorical, less overt one; in The Crucible, this meaning is a figurative witch hunt, or a hysterical search to identify a person or people that one fears as a threat. We fear what we do not understand, and we often scapegoat people in an effort to quell our own feelings of panic and hysteria. During the 1950s, when Miller wrote the play, the most immediate threat felt by the American public was the threat of communism, and other educators have pointed out how the play allegorizes that era. But if the play only addressed fears of that threat, how popular would it still be today? Not very, perhaps. There was also a metaphorical witch hunt during the 1980s with the AIDS crisis. Just like during the Salem witch trials, a person could not tell simply by looking at another person if they were a threat (in the 1690s, that meant being a witch, and in the 1980s, that meant having HIV), and people began to scapegoat the gay community, blaming this group for the spread of a virus that can be spread by anyone who engages in sexual contact. Hysteria and the fear of contracting the virus began to motivate people to turn on any man they thought might be gay, just like people turned on their friends and neighbors in the play.
Thus, the play does not simply allegorize the actions taken by the House Un-American Activities Committee during the early 1950s; it allegorizes any figurative witch hunt, in which people succumb to hysteria and look for scapegoats to blame for their problems or fears.