This isn’t a simple question. Mainly, because you might get across with both words to say the same idea. Still, let me try:
Most of the time, you can use “para” with the same idea of “to” and “por” with the same idea of “by”. But, for sure, there will some exceptions. Anyway, I think this is the main difference.
Let me write two examples to show you a little difference:
I am going to shopping and I will buy you some stuff. It means: “Vou fazer compras para você”.
I am going to shopping in your place. What means: “Vou fazer compras por você”.
So, after all, to make things simple, you can think “para você” as “to you”, and “por você” as “by you”.
And, don’t worry, I assure you that people will understand you if you’re clear enough. I hope I have helped.