Many use the terms “jail” and “prison” interchangeably, and while both terms refer to areas where people are held, there's a substantial difference between the two methods of incarceration. Where a person who is accused of a crime is held, and for how long, is a factor in determining the difference between the two—and whether a person is held in a jail or a prison is largely determined by the severity of the crime they have committed.
A jail (or, for our British friends, a “gaol”) refers to a small, temporary holding facility—run by local governments and supervised by county sheriff departments—that is designed to detain recently arrested people who have committed a minor offense or misdemeanor. A person can also be held in jail for an extended period of time if the sentence for their offense is less than a year. There are currently 3163 jail facilities in the United States.
A jail is different from the similarly temporary “lockup”—sort of like “pre-jail”—which is located in local police departments and holds offenders unable to post bail, people arrested for public drunkenness who are kept until they are sober, or, most importantly, offenders waiting to be processed into the jail system.
A prison, on the other hand, is usually a large state or federal-run facility meant to house people convicted of a serious crime or felony, and whose sentences for those crimes surpass 365 days. A prison could also be called a “penitentiary,” among other names.
To be put in a state prison, a person must be convicted of breaking a state law. To be put in a federal prison, a person must be convicted of breaking federal law. Basic amenities in a prison are more extensive than in a jail because, obviously, an inmate is likely to spend more than a year of his life confined inside a prison. As of 2012, there were 4575 operating prisons in the U.S.—the most in the world. The country with the second highest number of operating prisons is Russia, which has 1029 facilities.