The structure used to + infinitive is used to refer to a past routine or situation which no longer exists at the present time.
It refers to past habits and states that do not exist today; something that you did regularly in the past but you don’t do now. ‘Used to + infinitive’ can only refer to a past time.