used to · adjective1
From used, past participle of use (“(archaic sense) to be in the habit of”) + to.
used to · verb2
From used, past of use (“(archaic sense) to be in the habit of”) + to (“infinitive marker”).
Etymology from Wiktionary, CC BY-SA 4.0.