Before 1775, imprisonment was rarely used as a punishment for crime. Since that year, however, incarceration rates have grown exponentially, creating the need for physicians in correctional institutions. Prison medicine began, in its most rudimentary form, in Victorian England, under the health reforms promoted by wealthy philanthropist and devout ascetic John Howard and his collaborator, well-to-do Quaker physician John Fothergill.
Another early development in the history of prison healthcare was the work of Louis-René Villermé (1782–1863), a physician and pioneering hygienist whose study, Des Prisons, was published in 1820. The work of Villerme and other French hygienists was an inspiration to German, American, and British public health leaders and spurred an overhaul in the conditions in which prisoners were held.
Health care in prisons has been commissioned by NHS England since 2013. Before that it was locally commissioned by Primary Care Trusts. Guidelines produced in 2016 by the National Institute for Health and Care Excellence recommended that on admission there should be a health check with confidential testing for hepatitis B, hepatitis C and HIV. In 2016 there were more than 4,400 prisoners aged 60 or over in England and Wales, and the number was increasingly rapidly. “They are sicker and more likely to have complex health needs than people of an equivalent age who are living in the community”.
In the 1970s, widespread intervention by federal courts improved conditions of confinement, including health care services and public health conditions, and it stimulated investment in medical staff, equipment, and facilities necessary to improve quality and organization of prison and jail medical services. Prison is often the first place that people in the USA are able to receive medical treatment which they couldn't afford outside.
The Society of Correctional Physicians  is a non-profit physician organization founded in August, 1992 as national educational and scientific society for the advancement of correctional medicine, and became the American College of Correctional Physicians in 2015.
Mental health services in prison aren't available in providing treatments for criminals; most prisoners have an untreated mental disorder and psychiatric care or treatment is expensive for the mentally ill. 64 percent of jail inmates, 54 percent of state prisoners, and 45 percent of federal prisoners in the US report having mental health concerns.