After being arrested, Rambo’s body is shown to be covered in scars, and in brief flashback moments, we learn that he was captured and tortured while a prisoner of war.
When we meet Rambo in the first film, he discovers that the last living member of his unit has died of cancer as a result of Agent Orange exposure.
It’s mentioned in the sequel that he was able to escape from the camp.
He drifts into the sleepy town of Hope, Washington, where he runs afoul of a sheriff who sees him as nothing more than a vagrant.