Prisoners are of two kinds, those lawfully confined, and those unlawfully imprisoned.
Lawful prisoners are either prisoners charged with crimes, or for a civil liability.
Persons unlawfully confined, are those who are not detained by virtue of some lawful, judicial, legislative or other proceeding. They are entitled to their immediate discharge on habeas corpus. One who has been captured while fighting under the banner of some state. He is a prisoner, although never confined in a prison. Prisoners are under the superintendence of the government, and they are now frequently exchanged.