As a preposition:
* Indicates purpose or reason: "I bought this for you." (The purpose of buying is for you)
* Indicates time duration: "She stayed there for a week." (The duration was a week)
* Indicates direction or destination: "He left for the airport." (Direction of movement)
* Indicates exchange or substitution: "I'll trade you this for that."
As a conjunction:
* Indicates reason or cause: "I'm going to bed, for I'm tired." (Reason for going to bed)
* Indicates purpose: "He saved his money, for he wanted to buy a car." (Purpose of saving money)
To determine if "for" is a preposition or a conjunction, look at the words that follow it.
* If it's followed by a noun or pronoun, it's likely a preposition.
* If it's followed by a clause (a group of words with a subject and verb), it's likely a conjunction.
Examples:
* Preposition: "I bought a gift for my friend." (Noun follows "for")
* Conjunction: "I stayed up late for I wanted to finish the project." (Clause follows "for")