The basic rule is that ‘para’ expresses purpose or destination, and ‘por’ expresses cause or motive.
Por
In a spatial sense, to mean ‘around’ or ‘through,’ or to suggest approximate location:
a) Anduvimos juntos por la plaza- we walked around the square together.
b) Pasaron por la calle con armas- they came through the street with guns; tienes que pasar por la túnel si quieres llegar a tu destino- you have to go through the tunnel if you want to arrive at your destination.
c) ¿Por dónde andaba? “No sé. Por aquí, creo.”- whereabouts was he? “I don’t know. Around here I think.”
In a temporal sense:
a) to mean ‘in’, but in an approximate manner:
Debió ser por mayo- it must have been some time in May
Por aquellos días nadie comía nada- in those days nobody was eating anything
b) to mean ‘for’, in order to express provisional duration:
Estuve en Inglaterra por cuatro meses- I was in England for four months. (Here, ‘durante’ is also possible, or often no preposition at all will be used: Estuve cuatro meses en Inglaterra).
Voy a Argentina por (or para) dos semanas- I’m going to Argentina for two weeks.
c) to mean ‘in the morning/ afternoon/ evening’, or ‘at night’:
Nos vemos por la mañana- we will see each other in the morning
Por la tarde me gusta dar un paseo- I like to go for a walk in the evening
(por la noche= at night)
d) to express something that is repeated on a regular basis:
Salgo con mi novio dos veces por semana- I go out with my boyfriend two times a week
Other uses:
a) to mean ‘by means of’: La alarma funciona por rayos infrarrojos- the alarm works by means of infra-red rays; Me enteré por un amigo- I found out by means of (through) a friend.
b) to mean ‘because of’: no pude concentrarme por el ruido- I couldn’t concentrate because of the noise; recibió una multa por aparcar en el centro- he received a ticket for parking in the centre.
c) to express the object/ receiver of a feeling, attitude or mental state: siento mucho cariño por ese chico- I feel a lot of affection for/ towards this boy; nuestro amor por nuestros hijos- our love for our children
d) to mean ‘in exchange for’ or ‘on behalf of’: compró un coche por dos mil euros- she bought a car (in exchange) for two thousand euros; Él dará las clases por mí- he will give the classes on behalf of me.
e) to mean ‘by’ when used in passive constructions: Fue descubierto por una joven de veinte años- it was discovered by a twenty year old girl.
Para
In a spatial sense, to express final destination/ direction after verbs of motion:
Íbamos para la playa cuando nos encontramos con David y terminamos en su casa- we were heading for the beach when we met David and we ended up in his house.
In a temporal sense, to mean a) ‘by’, i.e. a deadline: estaré lista para las cinco- I will be ready by five o’clock; b) ‘for’ a specified period of time in the future: tenemos ropa para tres días- we have enough clothes for three days.
To express purpose, object or destination: estudia para ser abogado- he is studying to become a lawyer; este regalo es para ti- this present is for you; una mesa para dos, por favor- a table for two, please.
To mean ‘considering’ or ‘in view of’: ha conseguido mucho para lo joven que es- he has achieved a lot considering how young he is.
To express opinion: para mí esta asignatura no es muy fácil- in my opinion this subject is not very easy.