Por and para are a little confusing because they both can be translated as for. But they have different uses. Here are some basic ones:
We use it for purpose/destination/goal:
La falda es para María. (The skirt is for María.)
Tengo un presente para Pedro. (I have a present for Pedro.)
Voy a la escuela para aprender. (I go to school in order to learn. In this case it means in order to.)
We use it for duration of time intervals:
Estoy en Nueva York por siete días. (I am in New York for seven days.)
or for exchange:
Compro un vestido por veinte euros. (I buy a dress for twenty euros.)