To is used to refer to movement with the aim of a specific direction or destination. The most common usage in this category is to define movement from one place to another. In such cases, to typically comes after a verb such as walk, run, drive, fly, sail, etc.
For example: “I flew to Tokyo.”
“I drove to a restaurant last night.”
“I ran to the bus stop.”
You also use to when referring to communicating with someone. Think of to as the means of directing something towards a specific direction or location. Now think of what you do when you communicate with someone - you direct your words towards them. Therefore, you should use the preposition to.
For example: “I spoke to my friend this morning.”
“She wrote a letter to her husband.”
“He sent a text to his dad.”
The same rule applies to objects. If you are directing an object towards a specific destination, you use to.
For example: “He passed the ball to his teammate.”
“She gave ten euro to charity.”
“She sent the package to her sister.”
To can also be used to indicate a specific position in relation to a person.
For example: “The bathroom is just to your right.”
“She stood with her back to the wall.”
Or to indicate the relationship between someone or something and another.
For example: "Here is the key to the front door of the house."
"I am married to a woman called Jane."
"He is like a father to me."
So, as you can see, to is very much a preposition that is about both going forward and establishing a connection. Think of it as a forward-pointing arrow that links an object or person to something else, but does not go beyond it. That idea can be further demonstrated within the category of time. For example, when we are telling someone the time, we might say:
"It is five to six."
To in this respect can therefore be seen as a replacement for another preposition, until, as what we are essentially saying in that sentence is that it is five minutes until six o'clock. The same can be said of this statement:
"I work from 9 am to 5 pm, Monday to Friday."
Again, you can replace to with until and still keep your intended meaning; but it is important to note that the same rule does not apply universally within the category of time, such as when you are making an estimate of how long something will take. For example, if you were cooking and someone asked you how long it will be before the food is ready, you might say:
"The food will be ready in five to ten minutes."
While until no longer works in that context, the idea of a forward-pointing arrow representing to still applies: