Josef K. serves as the protagonist who undergoes a bewildering experience with the legal system, representing the struggles of individuals against an impersonal and oppressive authority.