We normally use the expression "used to" to talk about an action or, better, a habit in the past and finished. It stopped to exist at the present time.
EXAMPLES
Affirmative
In this form the expression "used to" is used to describe a long lasting action, a state or a habit in the past. The sentence tells us indirectly that what you are talking about has ceased to exist.
I used to go with my mother everywhere she went. (this habit stopped now as I get older)
We used to live in a large house (but now we live in a smaller one)
Leila used to have dinner very late at night (Now she no longer does)
Rule
As you might have noticed, "USED TO" is followed by a verb in the infinitive without "to" and this is the rule.
used to + V1 *
used to
go
used to
live
used to
have
Negative
In this form the 'd' of "used to" is omitted because the auxiliary 'did' does its job:
did + not + use to + V1 *
I didnot
use to eat onions.
I didn't use to go to school by bike. (but now I do)
Leila didn't use to wear a scarf. (but now she does)
Eric didn't use to get up early. (but now he does)
Interrogative
Like with the negative form, when we want to ask a question about a repeated action, a state, or a habit in the past, the auxiliary 'did' takes the role of the 'd' of 'used to'.
The form is as follows:
did + subj. + use to +
V1 *
Did you use to smoke?
Did she use to eat fried food?
Where did you use to spend your holidays?
What did you use to have for breakfast when you were in China?
Which school subject did you use to like when you were at the primary school?