These two Spanish prepositions are essentially equivalent to the English 'for,' yet each has different uses. Here's a rundown:

'Por'

Use when referring to a specific period of time; for example, 'I was sick for three weeks' would translate as 'Yo estaba enfermo(a) por tres semanas.' Use 'por' when describing an indefinite period of time as well, as in 'Yo leo por la noche' ('I read at night'), or 'Ella juegue tenís por la tarde' ('She plays tennis in the afternoon').

When using the passive voice, 'por' indicates the 'verber'- for example, The South was conquered by the North' would translate as 'El sur fue conquistado por el norte.'

'Por' also expresses the concept of 'in exchange for'; 'Él me dio su tarea por un beso' means 'He gave me his homework for a kiss.'

After verbs of motion, por becomes kind of a general locational preposition and can mean 'along,' 'through,' 'by,' and 'around.' 'She painted all over his body' would translate as 'Ella pintado por todo su cuerpo.'

In English, it's 'per' (or 'by the'), in Spanish, use 'por': 'E2 nukes 100 writeups per week' translates as 'E2 nuke (made-up verb, sorry) cien nodas (ditto with that noun- this node's on prepositions) por semana.'

'Por' also expresses manner or means, as in 'I spoke with him on the phone' ('Yo hablaba con el por teléfono').

Reason or motive also requires the use of 'por,' as in 'Yo trabajo por necesidad, no por divirtirme' ('I work out of necessity, not to amuse myself').

'Por' also expresses opinion or estimation like the English 'for' or 'as.' Example: 'He was known as El Greco' becomes 'Se le conocia por El Greco.'

'Por also means 'for the sake of' and 'on behalf of,' as in 'Lo hago todo por ti' ('I do it all for your sake').

Finally, 'por' is also used in certain adverbial expressions: 'por eso' ('that's why,' 'therefore,' and 'so'), 'por lo común' and 'por lo general' ('generally'), 'por lo visto' ('apparently'), and 'por supuesto (que)' ('of course,' 'naturally').

'Para'

'Para' expresses purpose or goal; for example, 'Yo le decía la verdad para disculparme' means 'I told him the truth to (in order to) exculpate myself.'

The special use of an object is expressed with 'para,' as in 'Yo compré un pastel para él' means 'I bought a cake for him.'

Destination or direction requires the use of 'para.' 'Anoche ella salio para México' means 'Last night she left for Mexico.'

A time or date in the future is indicatedby para: 'Yo voy a completar esta noda para las cuatro' means 'I'm going to finish this node by (for) four o'clock.'

When comparing something with others of its kind, use 'para,' as in this sentence: 'Para un joven, tú eres muy inteligente' ('You're very smart for a young person.')

Finally, 'para' is used with the reflexive pronoun 'si' to mean 'to or for oneself, himself, etc.' Example: 'Lo quieren todo para sí' ('They want everything for themselves').

I hope this helps shed some light on these oft-confused prepositions. PS- Feel free to point out errors in my Spanish- I am not a native speaker.