If you have defeated an enemy with the Capture/Kidnap skill, they are held in your prison for you to persuade to join your side and fight for your cause. You can try to persuade them to join you at no cost, or bribe them with resources to try to speed up the process. Eventually, they will join you! Or, you can release them if you get tired of trying. Turncoat units function much like MyCastle recruited units and Einherjar units: They cannot build support levels with any units. Higher level prisons allow you to hold more prisoners.
One fun use of prison units is as cannon fodder, especially if you’re playing on higher difficulties on Classic mode. Also, some of the prison units, such as the Spear Fighter, are real gems to obtain in their respective games where you can’t get that class otherwise (in this case, Conquest). If you miss out on a prison unit in the storyline, the DLC Museum Melee has all of them return as minibosses so you can capture them there.
In Conquest, Niles has the Kidnap skill. In Birthright, Orochi has the Capture skill. You get access to both characters in Revelations. So if you want prison units, better make sure you invest in either unit.