In what mediums have you seen the concept 'based on a true story' in?
In regard to The Crucible, the play was, indeed, based on the Salem Witch Trials that took place in the late-seventeenth century. However, Miller used the witch trials as a metaphor for the contemporary "witch trials," or "witch hunts" that took place during the McCarthy Era. Joseph McCarthy was a senator from Wisconsin who oversaw the House Un-American Activities Committee (HUAC) from the late-1940s to the 1950s. The purpose of this committee was to find and expose Communists in every sector of public society, including those who worked in the arts and entertainment.
Miller used the Salem Witch Trials to criticize the behavior of McCarthy, and others who despised Communists and Communist sympathizers. He also wanted to criticize the habit of "naming names," which was the practice of naming other Communists in order to exonerate oneself from being blacklisted—or denied the possibility of work due to Communist affiliations. Numerous people in the entertainment industry, such as the screenwriter, Dalton Trumbo—on whom a recent film was based—were blacklisted from Hollywood. There were others, such as the director and screenwriter Elia Kazan, who "named names" to avoid being penalized.
Kazan also made films based on true stories, including America, America (1963), which was the story of his Anatolian Greek grandfather who escaped Turkish oppression to immigrate to the United States.
Given that you tagged The Crucible in your question, it would be relevant to begin with that particular play.
The phrase "based upon a true story" calls readers (or watchers of a play or movie) attention to the fact that there are elements within the text (or plot) which depict something that actually happened.
In regards to Miller's play The Crucible, Miller (himself) states that the play was written based upon actual historical facts. It is well known by historians, lovers of the supernatural, and students alike that the Salem Witch Trials took place. Therefore, Miller's play is based upon a "true story."
Outside of Miller's play, there are many other "mediums" which have used true events to base novels, plays, and movies upon.
Below are a couple examples of other "mediums" which are based upon a true story are:
1. Elephant (2003)- This movie is based upon the shootings at Columbine in 1993.
2. Monster (2003)- This movie shows the writer and director's interpretation of Aileen Wuornos, the first female serial depicted in modern film.
3. We Need to Talk About Kevin (2003)- This novel was inspired by Columbine and other school related shootings.