Text of Amendment:
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances.
Origins of the First Amendment
The founding father most concerned--some might say obsessed--with free speech and free religious exercise was Thomas Jefferson, who had already implemented several similar protections in the constitution of his home state of Virginia. It was Jefferson who ultimately persuaded James Madison to propose the Bill of Rights, and the First Amendment was Jefferson's top priority.
The first clause in the First Amendment--"Congress shall make no law respecting an establishment of religion"--is generally referred to as the establishment clause. It is the establishment clause that grants "separation of church and state," preventing--for example--a government-funded Church of the United States from coming into being.
The Free Exercise Clause
The second clause in the First Amendment--"or prohibiting the free exercise thereof"--protects freedom of religion. Religious persecution was for all practical purposes universal during the 18th century, and in the already religiously diverse United States there was immense pressure to guarantee that the U.S. government would not require uniformity of belief.
Congress is also prohibited from passing laws "abridging the freedom of speech." What free speech means, exactly, has varied from era to era. It is noteworthy that within ten years of the Bill of Rights' ratification, President John Adams successfully passed an act specifically written to restrict the free speech of supporters of Adams' political opponent, Thomas Jefferson.
During the 18th century, pamphleteers such as Thomas Paine were subject to persecution for publishing unpopular opinions. The freedom of press clause makes it clear that the First Amendment is meant to protect not only freedom to speak, but also freedom to publish and distribute speech.
Freedom of Assembly
The "right of the people to peaceably assemble" was frequently violated by the British in the years leading up to the American Revolution, as efforts were made to ensure that radical colonists would not be able to foment a revolutionary movement. The Bill of Rights, written as it was by revolutionaries, was intended to prevent the government from restricting future social movements.
The Right to Petition
Petitions were a more powerful tool in the revolutionary era than they are today, as they were the only direct means of "redressing ... grievances" against the government; the idea of pursuing lawsuits against unconstitutional legislation was not feasible in 1789. This being the case, the right to petition was essential to the integrity of the United States. Without it, disgruntled citizens would have no recourse but armed revolution.