For something that was true before but is not true now, say used to + the base verb.
used to + base verb
I used to play tennis. (but I stopped)
Amina used to live near the harbor. (now she lives downtown)
We used to walk to school every day.
Not "I use to play tennis." — say "I used to play tennis.". Here it has the -d: used to. It means you did it before, but not now.
Try it: Amina ___ live near the harbor, but now she lives downtown. (used to / use to / uses to) Answer: used to — For something that was true before and changed, use used to, with the -d. "Use to" (no -d) and "uses to" are not the past form here: she used to live there.
didn't use to
To say something was not true before, say didn't use to + the base verb. After didn't, drop the -d: it is use to, not "used to".
I didn't use to like coffee. (now I do)
She didn't use to study hard.
We didn't use to have a car.
Not "I didn't used to like coffee." — say "I didn't use to like coffee.". After didn't, there is no -d: didn't use to.
Try it: I ___ like coffee, but now I drink it every day. (didn't use to / didn't used to / don't use to) Answer: didn't use to — The words are right, but after didn't there is no -d: didn't use to (not "didn't used to"). And for the past you need didn't, not "don't".
Did you use to ...?
To ask, start with Did + the person + use to + the base verb. Again, after Did, it is use to with no -d.
Did you use to play tennis?
Did she use to live here?
Where did you use to work?
Try it: ___ you use to play tennis? (Did / Do / Were) Answer: Did — To ask about the past, start with Did: Did you use to play tennis? "Do" is for now, and "Were" is for what someone was, not what they did.
Try it: She ___ smoke, but she ___ exercise much — she never went to the gym back then. (used to … didn't use to / use to … didn't used to / used to … didn't used to) Answer: used to … didn't use to — On its own it keeps the -d: used to smoke. But next to didn't, the -d goes away: didn't use to. The -d is there in the plain sentence and gone after did/didn't.