person who is deprived of liberty against their will

A prisoner is a person who is arrested, made to stay in a prison. People who are suspected of a crime, for example a murder, may be arrested and held in jail so they won't escape before their trial. After conviction a prisoner may be punished, for example by being a prisoner for a long time.

A prisoner of war is a person who was captured by the enemy in a war.