What will happen if a question gets off-topic
Can someone else's answers or comments lead to the closing or locking of my question?
If you're getting mostly off topic answers/comments, chances are you have not phrased your question clearly enough leaving it open to misunderstanding.
If it's only one comment/answer that's off-topic, you could:
No. Answers will not affect the judgement on whether your question should be closed.
If your question is closed as off topic, it simply means that it is not a good fit for the site. The reason for closure will be appended to the question as part of the close notice. For more details, see the FAQ.
If you really believe that the closure is not justified, you can first rephrase your question to try and address the apparent reason for closure, then submit a question here on meta explaining why you think your question is valid. If it is a valid reason, chances are you will get sufficient votes for the question to be reopened. If not, then take on board whatever comments you get and use it to post better questions in the future.
As for questions being locked, this is a less common and can only be done by moderators (see FAQ). Locking due to Off-topic comments (as highlighted in your screenshot) tend to happen when:
In addition, for borderline questions there may be on occasions a dispute on whether a question should be closed; it ends being repeatedly closed and reopened and this will lead it being locked by a moderator. This will usually lead to a discussion on meta and the post may be unlocked once the dispute is settled.
In short, if a question abides to the guidelines, there should be no reason why it will be closed/locked as a result of the actions (comments/answers) of others.
Most probably that will not happen. However, if there's a huge editing war/comment-flamewar going on, Moderators may intervene and temporarily lock the post in dispute while it gets settled - either using the chat system or here on Meta.
If there is a big amount of off-topic comments, moderators could block the question to avoid more off-topics comments are added, but the question should be blocked for the strictly necessary time. Locking a question is done in an "emergency" situation, and it doesn't happen because two off-topic comments; it also depend from the type of comments.
The fact a question gets many answers could be a sign that the question is subjective, chatty or open-ended. In this case, the question could be closed because five users voted to close it.
No. That'd be pretty silly
Off topic answers will be deleted, but the question will remain. The same goes for comments.
The same applies for flags on a comment on an answer; if an off-topic comment is posted on an answer, the comment may be deleted, but the answer will remain.