"Prison" vs "jail": what's the difference?

What is similar?
Both "prison" and "jail" are facilities used to detain individuals who are accused of or convicted of crimes. They serve as places of incarceration and are integral parts of the criminal justice system.
What is different?
"Prison" typically refers to a facility for long-term confinement, usually run by the state or federal government, where individuals convicted of serious crimes (felonies) serve sentences longer than one year. "Jail" is generally a short-term detention facility operated by local authorities, such as cities or counties, used for individuals awaiting trial or serving short sentences for minor offenses (misdemeanors).
Which one is more common?

Examples of usage
Prison- He was sentenced to ten years in prison for armed robbery.
- The prison houses inmates convicted of serious offenses.
- She visits her brother in prison every month.
- After serving time in prison, he struggled to rebuild his life.
- The prison implemented new rehabilitation programs for inmates.
- He spent the night in jail after the altercation.
- She was released from jail after posting bail.
- The suspect is currently in jail awaiting trial.
- The overcrowded jail faced criticism from human rights groups.
- They took him to jail for driving under the influence.