Both jails and prisons house inmates but there are some important differences in what the two institutions are used for.
Sentenced or Not?
People accused of crimes but not yet convicted are held in county or city jails. In some cases, a bond amount is set and if the defendant can pay it he or she will be released until the trial or settlement in court. If no bond is set or the defendant cannot afford to pay it, he or she will be held in the county or city jail throughout the judicial process.
For the most part, prisons only house those who have been sentenced to incarceration for a felony conviction. In rare cases, someone on parole who is arrested for a parole violation might be sent back to prison to await the violation hearing and outcome.
Misdemeanor or Felony?
Those convicted of misdemeanors do their time in a county jail, while those convicted of felonies go to prisons. There are exceptions. The rule of thumb is, if your incarceration is going to be for more than a year, you get transported to prison. If you will be serving less than a year, you complete the sentence in county jail.
For example, if you are convicted of a felony but sentenced to serve less than a year then be placed on probation, you might be allowed to do the time in a county jail. Conversely, if you are a convicted felon and later convicted of multiple misdemeanors and will have to serve several years back-to-back, you might be sent to prison to complete the time.
You cannot bail someone out of a prison, but can usually bail someone out of county jail (unless they have been sentenced).
Jails do not always provide outdoor time. Prisons almost always have yards and outdoor time.
Classes are rare in a county jail. Prisons usually offer classes and or prison jobs to inmates who qualify.
County jails can be dangerous. Prisons are more so.
A county inmate usually does the whole sentence at the county facility. A state prison inmate can be shipped anywhere in the state to different prisons during his or her sentence.