Used to is a modal verb expressing habit. Used to is a simple past form only. It is used to talk about repeated events and actions in the past:
My father used to walk three kilometers each morning.
He used to be a baker.
We use the auxiliary did to form interrogative and negative sentences:
Did you use to smoke?
I didn`t use to smoke.
He used to smoke, didn`t he? [ question tag]
He didn`t use to smoke, did he? [ question tag]
Retired English Teacher