This is taken from here.
One of the famous Imam, Imam Syafie has provided us with some tips on how to curb the above problem. Arrogance or "riya'" is one of the major sins in Islam and can lead to 'shirk'.
1. When you meet the elderly, respect them because they have worshipped Allah long time ago.
2. When you meet small children (or people younger than you are), be humble to them because they are still pure, innocent and free from any sins.
3. When you meet ulama', respect them for their knowledge. They know a lot more than you.
4. When you meet ignorant people (jahil), be aware that they commit the sins because they do not know, and you are worse than them if you commit the sins but you know they are wrong.
5. When you meet non-muslims people, respect them and have in mind that maybe one day they will embrace Islam.
Islam is beautiful becuase muslims are obliged to respect others and to avoid prejudice. Indeed we have no right to judge others and to tell that he/she is going to hell because it's the end that decides everything.