Two examples, that's good. Let's start off slowly because the topic can be a big one.
The preposition to is short for towards. It expresses a direction; e.g., ran to the house; gave it to them; promoted to manager:
Ex: She was promoted to (the higher position of) manager.
The preposition for, in our example below, expresses a reason: it tells us why something happened. Which is why it can be replaced by the phrase because of:
Ex: She was promoted for/because of her experience.
Does that help so far?