Prisoners are entitled in all circumstances to respect for their persons and their honour. (Geneva III)
First off, prisoners of war are prisoners of the country that captures them; they are not prisoners of the soldier, unit, or commander of the unit that captures them. Also, much along the lines of "innocent until proven guilty," any captured combatant is assumed to be a prisoner of war and must be treated accordingly; if there is any doubt as to the applicability of POW status, the rules regarding prisoners of war must be followed until a proper tribunal is convened to determine whether POW status is applicable on a case-by-case basis. When the United States systematically denied POW status to captured Taliban combatants in the 2001-2002 war in Afghanistan, it was in violation of the third Geneva Convention. In the course of an armed conflict involving parties to the Geneva Convention, captured combatants are POWs until proven otherwise.
Like the sick or wounded, prisoners of war (POWs) are protected under the Hague and Geneva laws from any violence, indignity, or biological experimentation. POWs must receive medical treatment if they need it, and medical staff must be brought in to the POW camp at least once a month to make sure everyone is okay. Unlike the sick or wounded, however, the military hierarchy is observed when it comes to prisoners of war: Officers can't be assigned to the same paid labor as enlisted troops; and while hard labor may be assigned to an enlisted troop as disciplinary action, an officer can't be punished in that manner.
Most of us have seen in movies and on TV the interrogation response of "name, rank and serial number." This stems from the third Geneva Convention, but its purpose is not exactly what it seems. It's true that prisoners of war have to provide their name, rank and serial number (as well as date of birth), but this is not only for identification purposes. It is also to assure that the person be treated "according to his rank or status." If an officer fails to make known that he is an officer, he can't be granted the privileges due an officer.
On the topic of questioning POWs, the interrogation tactics that seem to be common practice in a time of war are all illegal. The third Geneva Convention outlaws everything beyond the simple asking of a question:
Confinement is illegal (POWs can't be held in prison cells unless it is for their own protection), but internment is allowed -- they may be kept within certain boundaries. However, their location must be as far from the fighting as possible. Besides being held in a special "camp," prisoners of war are supposed to be granted all of the rights and privileges that their captor grants to its own armed forces, at least in terms of food, water, shelter, clothing, exercise, correspondence, religious practice and other basic human needs. They are supposed to be informed of their exact location -- supplied with their mailing address, in fact -- so that their relatives may send them letters and packages.
Beyond the protection from violence, intimidation and affronts to personal dignity, prisoners of war are supposed to be safeguarded from "public curiosity" (Geneva III). The broadcasting of pictures and video of wounded prisoners of war is an affront to their dignity and an appeal to public curiosity, and as such is prohibited.
Once captured by the enemy, prisoners of war are subject to the laws of the armed force that is holding them. They must act according to the rules and regulations of their captors, and breaking those rules leaves them open to the same trial and punishment as that faced by a member of the detaining military. They are under the control of the detaining power and their detention is legal; as such, their escape is a breach of that law. So if they escape, they can be punished. But only if they are recaptured before they make it make to their own army. If they successfully escape -- if they return to the territory of their own armed forces -- and then are captured once again, they cannot be punished for their previous escape. This same rule of success negating the offense applies to spies who escape their captors: If a spy breaks free and is caught before he makes it "home," he can still be tried as a spy; if he makes it back to his own side and is then recaptured, he is no longer considered a spy who is subject to trial and punishment -- he is considered a prisoner of war, and is therefore protected.