The play is set in Salem, Massachusetts, in 1692. The town is a Puritan settlement and so, in theory, its religious leader, Matthew Parris, has a great deal of power and influence in its running. We learn little about Salem before the 'witch' incident but it is clear from events later in the play that the village was far from perfect. John Proctor has committed adultery, Parris is in dispute over his pay and there are numerous examples of jealousy and greed among the inhabitants. The important thing is that, at the beginning of the play, the town seems harmonious but the tensions caused by Abigail and the girls bring completely unconnected problems to the surface. Miller seems to be suggesting here that although 50s America seemed to be at peace with itself it was just as likely to be full of 'sin'.
The way in which the 'witch-hunt' mentality develops is well illustrated by the progress of the children's accusations of witchcraft. At first the children only accuse people whom they know are weak within their society so that the accusations are easily accepted. However, as others observe the children pointing the finger of suspicion, they too start to accuse their neighbours of witchcraft as a way of taking revenge or for personal gain:
"…if Jacobs hangs for a witch he forfeit up his property- that's law! And there is none but Putnam with the coin to buy so great a piece."
Miller uses incidents like this as a way of showing, without too much risk to himself, that this is what the committee chaired by Senator McCarthy, the House Un-American Activities Committee (HUAC) and the communist paranoia were doing - people were using it to increase their power and for revenge. The best example of this in the 50s is the Hollywood Blacklist. Celebrities of the time would accuse other celebrities of communist activities in order to prevent their own implication. Charlie Chaplain left America to avoid this, for instance, and many other artists were forced to work using 'front-men' to stay in work.
Miller's main target was, of course, McCarthy as he was responsible for most of the extreme activity. Fairly obviously McCarthy is represented by Abigail - who in the play is motivated at first by fear, greed and lust, but later by the simple pleasure of wielding power. In the pre-feminist 1950s, Miller's portrayal of McCarthy as a female child would also have been seen as belittling. An interesting point is that at the start of the play the audience are made to feel it is Abigail who is suffering but as the play progresses Miller shows Abigail is not the victim but the attacker - this could be compared with the early fears of communism where most people sympathised with McCarthy. Miller's play has several characters that could represent major figures in politics at the time; Paris is supposed to represent the American government, and he is shown as being selfish and weak, so it is clear the play is not just an attack on McCarthyism but also on the American tendency to mix religious and secular authority.
The trials Miller uses in the play are similar to the ones McCarthy held in the 50s - both sets of trials were biased and evidence was invented. In the 50s, McCarthy made up evidence and Abigail's deceptions over Elizabeth are clear to the audience from the start. The major difference between the two sets of trials is their consequences. The HUAC had no real power but if someone was brought up on charges their lives would be ruined. In Salem the consequences of conviction are fatal. In The Crucible the court tries to force Proctor into a confession:
"PARRIS: Proctor, the village must have proof that-
PROCTOR: Damn the village! I confess to God and God has seen my name on this! It is enough."
The court's use of pressure to try to get a confession from John Proctor is Miller's way of suggesting that corrupt methods were also used to get confessions from the people accused of communism.
Miller's use of a flawed hero represents a message to others who would wish to stand up against the anticommunist witch-hunt. John Proctor is an adulterer but he has enough integrity to regret his sins and even admit them in public in order to resist Abigail's power. This suggests that you do not have to be perfect to resist McCarthyism, and that it is better to admit your faults than to lose your integrity.
The Crucible works effectively as a satire on McCarthyism for the reasons outlined above, but it would not be quite so effective if it didn't work as a play. It is a powerful drama with interesting characters trapped in a difficult situation, first and foremost. Otherwise we would not be reading it today after communism itself has collapsed. Miller's final point is that there are always witch-hunts when it is necessary for people to stand up against mass hysteria and moral panic