The First Amendment has two provisions concerning religion: the Establishment Clause and the Free Exercise Clause. The Establishment clause prohibits the government from "establishing" a religion. The precise definition of "establishment" is unclear. Historically, it meant prohibiting state-sponsored churches, such as the Church of England.
Today, what constitutes an "establishment of religion" is often governed under the three-part test set forth by the U.S. Supreme Court in Lemon v. Kurtzman, 403 U.S. 602 (1971). Under the "Lemon" test, government can assist religion only if (1) the primary purpose of the assistance is secular, (2) the assistance must neither promote nor inhibit religion, and (3) there is no excessive entanglement between church and state.
The Free Exercise Clause protects citizens' right to practice their religion as they please, so long as the practice does not run afoul of a "public morals" or a "compelling" governmental interest. For instance, in Prince v. Massachusetts, 321 U.S. 158 (1944), the Supreme Court held that a state could force the inoculation of children whose parents would not allow such action for religious reasons. The Court held that the state had an overriding interest in protecting public health and safety.
Sometimes the Establishment Clause and the Free Exercise Clause come into conflict. The federal courts help to resolve such conflicts, with the Supreme Court being the ultimate arbiter.
Check out similar cases related to Engel v. Vitale that deal with religion in schools and the Establishment Clause of the First Amendment.