'Por' mainly indicates the cause, the reason why something happened. However, it is also used to express an amount of time, an approximate place, the price of an item, the means through which something happens, the different parts of the day.
'Para', on the other hand, is mainly used to highlight the final aim of an action, the receiver of an object, an opinion, the use of an item.