Hi Anon,
When you have a form of the word "to do" (like "Does" in your sentences) the main verb goes back to its infinitive form (in your sentences "have.")
Does she have a pen? Yes, she has a pen. But: Yes, she does have a pen.
Let us know if that doesn't answer your questions.