I am new to zero knowledge proofs. I read the paper Efficient Protocols for Set Membership and Range Proofs by Jan Camenisch, Rafik Chaabouni and Abhi Shelat.
The author proposed a zero knowledge set membership protocol in page 9. Then, he stated in theorem 1 that the the protocol is a zero-knowledge argument of set membership. Then, he explicitly said "to prove honest-verifier zero-knowledge, we construct a simulator Sim that will simulate all interactions with any honest verifier V. This is all detailed in Page 8 and 9.
What is simulator, and what is purpose of Sim? Is the Sim an adversary? What does "the extractor" mean? If you look at the paper, the simulator in Fig. 2 looks exactly to the proposed protocol in Fig. 1.