There is NO DIRECT translation to Spanish.
In Spanish, the imperfect tense is expressed by an inflection of the verb or by the verb “soler.”
Here are phrases with USED TO:
Verb Be + used to + -ing form of verb
Get used to + something
Get used to + -ing form of verb
My brother used to hide chocolate from me all over the house.
Mi hermano solía esconder chocolates de mí por toda la casa.
I eventually got used to the constant noise.
Eventualmente me acostumbré al ruido constante.
I’m used to having coffee in the morning.