Jail and prison are ideologically the same thing: to take away the privilege of freedom. If you have been found guilty of a crime, and your punishment entails serving jail or prison time, then you have lost your privilege to freedom. You will be placed in a facility that restricts your access to society.
The difference however between jail and prison depends on three main factors,
- Length of confinement
- Severity of crime
If you are placed in jail you are serving a shorter sentence (less than 1 year), have been convicted of a misdemeanor crime or were placed on probation in a felony case, and will be in a facility that is ran by local law enforcement; generally the county sheriff's office.
If you are placed in prison you have been convicted of a serious crime (a felony) and will be serving a longer sentence (in excess of 1 year). Prisons are operated by state governments (The Idaho Department of Corrections) or the Federal Bureau of Prisons (BOP).
If you visit each of these places (like I have many times) you will see immediately that jail and prison are very different places. While jail is by no means a happy place to be, prison is far more serious.