It is a play; it is loosly based on the stories of witchcraft in Salem, Massachusetts. It would be considered historical fiction since it is based on these events. It is also a paradoxycal allegory since the title The Crucible is also a vessel in which metals are heated and refined.
The play is representative of the McCarthy era witch hunts of the 1950s when persons with opinions differing from that of the mainstream of society were accused of being anti-American. Arthur Miller (author of this play) was even accused of Un-American activities during this time. "The Crucible is seen as more of a commentary on McCarthyism than on the actual witch trials at Salem. "(http://www.enotes.com/crucible)
It is not an accurate history of these events since some of the events in the play did not take place in real life incidents surrounding the stories of witchcraft at Salem. And other occurrences involved with the Salem witch trials are changed around to suit the dramatic elements of the play.