Both "How did you know?" and "How do you know?" are correct, but they are used in different contexts.
- "How did you know?" - This is used when you are asking someone how they came to know or discover something in the past. It implies that the person knew something before the current moment, and you are curious about the process or circumstances that led to their knowledge.
Example: Person A: "I already booked the tickets for the concert." Person B: "How did you know? I thought they were sold out!"
- "How do you know?" - This is used when you want to inquire about someone's current knowledge or the basis of their statement or claim. It is used in the present tense to ask for clarification or evidence of their knowledge.
Example: Person A: "I heard that there's going to be a surprise party for Jane tonight." Person B: "Really? How do you know? Did she tell you?"
In summary, use "How did you know?" when asking about past knowledge, and use "How do you know?" when asking about someone's current knowledge or the basis for their claim in the present.