Por and para can be confusing, as they can both be translated as for in certain sentences. Here's how to use them correctly:
We use para for:
Compré un regalo para Ana. I bought a present for Ana.
Compré una mesa para mi apartamento. I bought a table for my apartment.
Iré para Boston el viernes. I’m going to Boston on Friday.
Trabajo para ganar dinero. (I work in order to earn money.)
Nosotros vamos a la escuela para aprender español. (We go to school in order to learn Spanish.)
Necesito el informe para el martes. I need the report for/by Tuesday.
We use por for:
Trabajo por ocho horas cada día.[3] I work for eight hours every day.
Estoy en Nueva York por tres días. (I am in New York for three days.)
Berges Institute está cerrado por Thanksgiving. Berges Institute is closed “because of” Thanksgiving.
Llegué tarde por el tráfico. I got there late because of the traffic.
Compré un par de zapatos por 100 euros. I bought a pair of shoes for 100 euros.
Cambié mi guitarra acústica por una eléctrica. I exchanged my acoustic guitar for an electric one.
Voy al gimnasio tres veces por semana. I go to the gym three times per week.
Leo tres libros por semana. (I read three books per week.)
**********
[1] In this example, we could use a instead of para with the same meaning: Iré a Boston el viernes.
[2] When using para as in order to, we usually use it with the infinitive form of a verb: Fui a New Jersey para visitar a mi amiga. (I went to New Jersey [in order] to visit my friend.) Voy al gimnasio para estar fuerte. (I go to the gym in order to be/to stay strong.)
[3] For periods of time, por is frequently omitted: Trabajo ocho horas cada día.
[4] When using por as because of, we usually use it with a noun: El metro no funciona por un incidente. (The subway does not work because of an incident.)