you use "to" to express an infinitive: to go, to swim, to walk, etc.
when you have a phrase like "I have to go" , then have is the auxiliary and it's already a verb which depends on the subject: I have...he/she/it has..after this construction you have to use the infinitive "to"
but there are many cases in which you have to use "TO":
- using a indirect question with "whether/if" or after verbs of thought, speech,etc.(to ask, to consider, to teach, etc) : He didn't know what TO do. (he didn't know what he should do).
- you use to if you want to shorten a subordinate clause which uses "so that", "such that, ""in order that": fresh air helps the flowers TO grow (fresh air helps the flowers so that they grow)
- after the verbs "to seem" and "to appear" :
She SEEMED TO be at home.
- after ordinal numbers, superlatives like: the first, the only:
Mary was THE FIRST to arrive.
- after too + adjective':
She is TOO young TO go to the party.
- after for +object:
It's easy for MARY TO do that.
I hope I could help you a bit! *greetings*