In Spanish, unlike in English, there are two words that mean "for": "por" and "para". These two prepositions are NOT interchangeable.
Uses of "Por"
Movement Through/By a Place
La excursión nos llevó por el centro
(The tour took us through downtown)
Duration of an Event
Ana navegó la red por dos horas
(Ana surfed the web for 2 hours)
Reason/Motive for an Action or Circumstance
Llegué a casa tarde por el tráfico
(I got home late because of traffic)
Por is also used to indicate:
Movement
Motion/general location (around, through, along, by)
Ex: Pasamos por el parque y por el río (we passed by the park and along the river).
Time Duration of an Action
(for, during, in)
Ex: Estuve en la Patagonia por un mes (I was in Patagonia for a month)
Action Reason/Motive for an Action
(because of, on account of, on behalf)
Ex: Lo hizo por su familia (she did it for her family)
Object of a Search
(for, in search of)
Ex: Vengo por ti a las ocho (I'm coming for you at eight)
Means by which Something is Done
(by, by way of, by means of)
Ex: Ellos viajan por la autopista (They travel by way of the highway)
Exchange/Substitution
(for, in exchange for)
Ex: Le di dinero por el reproductor de MP3 (I gave him money for the MP3 player)
Unit of Measure
(per, by)
Ex: José manejaba a 120 kilómetros por hora (José was driving 120 kilometers per hour)
Uses of "Para"
Toward a Destination
Mis amigos van para el estadio
(My friends are going to the stadium)
Action Deadline
Tengo que escribir un ensayo para mañana
(I have to write an essay for tomorrow)
Indication of for Whom Something is Intended/Done
Estoy preparando una sorpresa para Eduardo
(I'm preparing a surprise for Eduardo)