@Noel
We use did to make a question in the past tense.
This is for regular AND irregular verbs in English.
(Exception is To Be and Modal Verbs such as Can)
Compare the following:
Present: Do they live in France?
Past: Did they live in France?
The main verb (live in the example above) is in its base form (of the infinitive). The auxiliary DID shows that the question is in the past tense.
NOTICE: The only difference between a question in the present tense and a question in the past tense is the change in the auxiliary verb.
Both Do and Does in present tense questions become Didn't in past tense questions.
Compare the questions in the examples below:
Present: Do you need a doctor?
Past: Did you need a doctor?
Present: Do you ride your bike to work?
Past: Did you ride your bike to work?
Present: Does he live in Italy?
Past: Did he live in Italy?
We can also use a question word (Who, What, Why etc.) before DID to ask for more information.
Did you study? – Yes, I did.
When did you study? – I studied last night.
Where did you study? – I studied at the library.