We use TO when we talk about a destination, what time it is, a distance – final point, when we compare something, when we give or explain something to someone and when we express a reason of an action, a purpose given with a verb.
I am going to Berlin
It’s ten minutes to twelve
There are 2 km from the center of the town to the stadion.
I always prefer meat to cheese.
I offered some beautiful flowers to my teacher.
I called to hear your voice.
We use FOR when we express some benefits, some period of time, a scheduale, when we agree with something, when we do something for somebody because we want to help, when we give a reason using a noun and some function using a verb with -ing form.
The treatment is good for your health.
I have worked at this project for 3 months.
We have an appointment for April the 3rd.
I am for not against this candidate.
Could you write this email for me? I have no time and I should send it today. (this means “instead of me).
Let’s go out for a pizza.
A pen is a tool we use for hand writing.
I took the pen to write.
I took the pen for the test.