Prisons belong to states or federal government, jails belong to the county, or city.
Jail are sometimes used to house sentenced prisoners who have shorter terms to serve, but are considered a temporary confinement for those awaiting trial/arraignment. they are located closer to urban areas, if combined with prisons they are separated from prisoners according to the severity of the offense, time and space permitting.
Prison are usually for convicted, sentenced offenders only. More remotely located they also tend to house more inmates than most jails.
Variations to these criteria are found depending on the laws within any jurisdiction.
Prison is considered to be more harsh than jail but neither is comfortable nor desirable.
Physical layout for jails is smaller and less regimented than prison.