An idiom is a phrase that has a meaning of its own that cannot be understood from the meanings of its individual words. The literal meaning of an idiom won’t make sense unless you have known or heard about them before.
Rub wrong way is an idiom which means to annoy someone.
Example: Harry would always rub the teacher in the wrong way and end up in trouble.
A proverb is a short, well-known pithy saying, stating a general truth or piece of advice. Proverbs are easy to understand and can be taken literally. Even if you have not heard the proverb before you can still deduce it meaning. Check the following example:
Early bird catches the worm is a proverb that means one who arrives first has the best chance for success.
Example: Evelyn got the position because the early bird catches the worm.