〜ために
in order to, for (the sake of)
Verb dictionary form + ために · Noun + のために
Sign up free to review this point on a spaced schedule.
ために gives a purpose: 日本の大学に入るために勉強しています, "I'm studying to get into a Japanese university".
After a noun it takes の and means "for (the sake of)": 家族のために働く, "work for my family"; 健康のために走る, "run for my health".
With verbs, ために is for goals you can act on directly, with the same person doing both parts. For results you can't just decide (being able to see, not catching a cold), Japanese uses ように, the next point: 見えるように, 風邪を引かないように.
A quick test: if the verb before it is something you can choose to do, it's ために.
Examples
日本の大学に入るために、毎日勉強しています。
I study every day to get into a Japanese university.
家族のために働いています。
I work for my family.
健康のために、毎朝走っています。
I run every morning for my health.
車を買うために、お金を貯めています。
I'm saving up to buy a car.
京都へ旅行に行くために、休みを取りました。
I took some time off to go on a trip to Kyoto.