My guards take incoming prisoners and put them in the holding cell but the problem is, as soon as the guard opens the door to bring a new prisoner in, the ones already in the holding cell leave the cell. They then run loose an injure themselves.
Prisoners are only obliged to stay in the holding cells when it is "sleep" time or "lockdown" time. They are allowed to leave it when your regime is on "shower", "eat", "yard", "work" or "free time". When you secure your holding cell with a jail door, the prisoners will be unable to open it themselves, so a guard will come and open the door for them.
When you notice that your prisoners immediately get into fights with guards as soon as they leave the holding cell, the area outside of it might not be sufficiently secured. When prisoners notice that they have an unobstructed path to the edge of the map, they will immediately try to break out and will be attacked by any guards they meet on the way out. You might even notice this happening when a guard opens the door to the holding cell and this door is the only one which prevents prisoners from leaving.
When you prefer your prisoners to stay inside the holding cell until you've built proper facilities, you can put your prison into "bangup" mode (button in the lower right corner). Any compliant prisoners will then be confined to the cells. However, keep in mind that many of the prisoners needs can not be fulfilled while in bangup in the holding cell. This will soon make your prisoners very angry and cause them to riot. So you better hurry with cell block construction, or disable prisoners intake in the "Prisoners" menu until you have enough empty cells for another shipment of prisoners.