Think short-term and long-term.
Jails are most often run by sheriffs and/or local governments and are designed to hold individuals awaiting trial or a serving short sentences (in Kansas, inmates serving 364 days or less serve their time in jail).
Prisons are operated by state governments and the Federal Bureau of Prisons (BOP) and are designed to hold individuals convicted of crimes.
Jails operate work release programs, boot camps, and other specialized services. They try to address educational needs, substance abuse needs, and vocational needs while managing inmate behavior. Inmate idleness contributes to management problems. State prison systems operate halfway houses, work release centers and community restitution centers - all considered medium or minimum custody. Inmates assigned to such facilities are usually reaching the end of their sentences.
There are approximately 3,600 jails in the United States.