

Friends are a blessing from Allah (SWT) and as such He mentions what are the best kinds of friends that a person can have and the best kind of friend that a person can be in the Quran. The two kinds of best friends mentioned in the Quran are:
1. Khaleel
2. Rafiq
These two are the best terms used for describing friendship in the Quran by Allah (SWT). For those that are aware, Prophet Ibrahim (AS) is called Khaleelullah in the Quran with literally means Friend of Allah (SWT).
Khaleel
This word comes from the word Khula which according to linguists means, a kind of friendship that penetrates deep into your heart. Meaning having a deep love and care about a friend who you miss quite much when they are not around, and you are always thinking about them, that kind of friend is called Khaleel. One must understand that that is a rare kind of friendship. This was the kind of friendship that Allah (SWT) had with Ibrahim (AS) as mentioned above.
And who is better in religion than one who submits himself to Allah while being a doer of good and follows the religion of Abraham, inclining toward truth? And Allah took Abraham as an intimate friend.
(Quran Surah An-Nisa Ayah 4:125)
According to Islamic teachings, there are friends that are best and closest in the world to us but on the Day of Judgment, they will be out enemies because they were not good friends and contributed only bad to us. The only people that are mentioned that will be spared from these kinds of people will be the ones that protected themselves and did not take such people in this world as their friends in the first place and had faith in Allah (SWT). In order to have good friends in this world, we have to understand what kind of path we are following in the world. A verse of the Quran mentions that on the Day of Judgment, the disbeliever will be chewing his hand and wishing he had taken a path next to Prophet Muhammad (SAW) (interpretation of meaning). What that means is kind of path you walk in life will put you in touch with people that are also on that path. A person who walks the path of Allah (SWT) and follows the guidance of Prophet Muhammad (SAW) will find himself coming into contact with other people that are also on the path of Allah (SWT). Thus it is the best practice in this world to become friends with people that remind you of Allah’s word and the way of the prophet (SAW).
Rafiq
The other best kind of friend that is described is the Quran is Rafiq. Rafiq in Arabic means comfort. This word comes from the Arabic word Imirfaqa which means a small pillow on your back that you place there to ease your pain. A Rafiq is a friend that is always there for you, who you can count on and who you can relax with when you are in stress and anxiety, basically a friend who you can proverbially lean on when you are in a hard time and they provide you with comfort. Also take note that when a person sits on a couch, they tend to relax and adapt a relaxed and informal posture. Similarly a Rafiq is a friend that you can be informal with and with whom you can relax completely and not with whom you do not have to act a certain way.
We have to strive in this world to do good deeds and keep good company so that Allah (SWT) makes us from the righteous on the last day. One fact of life that we all must understand being Muslim is that in today’s world where materialism, fraud and sin are commonplace, it is common to see that when a person turns back to Allah (SWT) and towards His religion, it is bound that he or she will lose friends and in extreme cases even family members who will want nothing to do with them. For that we must be prepared and have hope in the fact that in the end, Allah (SWT) will put us in company of the greatest people to have ever walked this earth.