There is no difference in meaning. They are synonyms.
However, there is a difference in the grammar of how they are used (you need to make sure you learn which prepositions to use with each one).
In addition, there are some contexts in which one word should be used, and not the other. This is just a question of learning all the individual expressions and memorising which word to use in each expression.
In addition, in my opinion, there is a difference in degree of formality. To me, "afraid" sounds much more formal than "scared".