Suzanne A states the basic parole system correctly. The Dix-Hill Cartel of July, 1862, formalized a system that had developed since the beginning of the War. It even went so far as to establish exchange rates for officers (1 Colonel = 15 Privates) in case an officer of equal rank was not available for exchange. The full text of the Cartel is linked below. Prison camps such as Camp Chase, Fort McHenry, Alton, Johnson's Island, Castle Thunder, Libby, etc. opened, but the number of prisoners was small owing to the level of combat operations. That began to change in early 1862 when large scale combat began.
http://cwnc.omeka.chass.ncsu.edu/items/show/611
Large scale captures of opposing soldiers began in 1862 (ie: Fort Donelson, Harper's Ferry). Rather than burden transportation networks with large number of men who would then have to be housed and fed, paroles were given. The reason A. P. Hill was late arriving at Sharpsburg is that his division was busy paroling Federal captives at Harper's Ferry. Paroled soldiers were on their honor not to serve until exchanged. If recaptured serving before being exchanged, a soldier could be executed. Confederate parolees frequently awaited exchange at their homes. The Federal government set up parole camps were Union parolees were housed. The town of Parole, Maryland, got its name as it was the location of Camp Parole, one such camp. Camp Douglas, later notorious as a POW camp for Confederates, served as a base for Harper's Ferry parolees as well.
The system began to breakdown in 1863 largely due to mistrust between the two sides. In 1862 the Union Army sent troops on parole to help put down the Dakota Uprising in Minnesota. Confederates claimed this violated the Cartel. The Federal government claimed some Confederates captured at Chickamauga were parolees from Vicksburg who had not been properly exchanged. The decision of Confederate government not to parole and exchange African American Union soldiers provoked a suspension of the Cartel by June, 1863. Exchanges restarted in late 1863, but General Grant, as commander of the Union armies, halted them in April, 1864, and they would not resume until January, 1865. Special exceptions were made for sick and invalid prisoners. It was in the late 1863 - early 1864 that some the more notorious prison camps opened - Elmira, Camp Sumter (Andersonville).