It all depends on context. To tell when to say yes, it is/they are/she does/etc., you must remember what was asked.
For example:
Q: Are Sally and John at home?
A: Yes, they are.
The answer "yes, they are" is appropriate, because of the Question, which also uses "are," because the subject contains more than one person. "They" in the answer replaces the subject "Sally and John." Alternatively, you could also answer "Yes, Sally and John are," but this is considered unnecessary and "Sally and John" are therefore referred to in the answer by using the pronoun "they."
Here are some other examples:
Q: Does this restaurant sell a lot of hamburgers?
A: Yes, it does
In this example, for the question, "this restaurant" is the subject and it uses the auxiliary verb "do" ("does" in this case). All you have to do to answer is:
1. Restate the subject. As I said before, you could say "yes, this restaurant does," but that is too long, so we replace "this restaurant with "it" : "this restaurant" ----> "it"
2. Repeat the verb, but in the opposite order from the question. When making a question, the verb usually comes first. However, when making a statement (such as the answer), the verb comes after the subject. Therefore, you get the answer "yes, it does."
Take a look at the following 2 questions and think about why they have the answers below:
Q: Is Bob going to baseball practice today?
A: Yes, he is.
Q: Am I in charge of the next meeting?
A: Yes, you are.
Now, try these yourself. What would be the best answer for each question, if you answer with "yes":
Q: Have you been to Beijing?
A:
Q: Is it going to rain tomorrow?
A:
Q: Are you in the chess club?
A:
Q: Are you from America?
A:
Q: Is she your friend?
A: