We can use "used to" to talk about a past habit or state.
An example for a state: "He used to live in London" (but he doesn't now)
An example for a habit: "He used to go on holiday to Scotland every year" (but he doesn't now)
"Used to" is the same for all subjects, and you follow it with the infinitive without "to":
"I / You / He / She / We / They used to smoke."
To make the negative, use "didn't" + use + to + verb. (Remove the final /d/ ending from "used".)
"I / He didn't use to smoke."
To make the question, use "did" as the auxiliary, and take the final /d/ ending off "used":
"Did you / she use to smoke?"
To talk about past habits in English, you can also use would + infinitive without "to":
"We would go to Scotland every year when I was a child."
"We would travel there by car overnight."
However, you cannot use "would" in this way to talk about past states. For this, you must use "used to".
Be used to + doing
There's a big difference between used to do - to talk about past habits or states and is used to doing - to talk about our familiarity with a place, or activity.
The form is subject + verb to be + used to + verb in the ing form / noun
"I am / was used to studying English every day."
"I am used to his jokes." (example with a noun)
"You are / were used to studying English every day."
"He is / was used to studying English every day."
You can change the verb "to be" with the verb "get" to talk about the process of becoming used to something (rather than the state of being used to something).
"If you live in England, you will get used to driving on the left!" (= it will no longer be a problem for you)
"He finally got used to the winter weather."
Don't make the mistake of combining both forms to make an ungrammatical sentence like "I am used to study."
Remember: Either "I used to study" (past habit but no longer true) or
"I am used to studying" (I am familiar with studying).