Don't panic means "don't worry"?
Try your English-Persian dictionary and see if the word you find in Persian for "panic" is the same as the word for "worry".
I would say that "Don't panic" has been used somewhat ironically here - ie not completely seriously. They could equally have said "Don't worry" in this context. I imagine that they are saying that you shouldn't worry/panic if you didn't understand the rule because with practice, or with more explanation, it will become clear.