In an authentic Hadith, Prophet Mohammad (pbuh) said: "Man is influenced by the faith of his friends. Therefore, be careful of whom you associate with."
Prophet Mohammad (pbuh) who has the most noble character and dealings with fellow humans gave us a very clear and simple message and advice in regard to friendship.
How should we choose our friends? We should choose the friend that believes and abide by our religion (Islam) and gives great respect to what Allah (SWT) and Prophet Mohammad (pbuh) has ordered us. And we should stay away from that who is not well mannered and gives no attention to what Islam is about or what pleases or displeases Allah (SWT), for he will surely affect us negatively. There is no good in the companion drowns us in sins and displeasing Allah (SWT).
In another Hadith, Prophet Mohammad (pbuh) said: "The example of a good companion and a bad companion is like that of the seller of musk, and the one who blows the blacksmith's bellows. So as for the seller of musk then either he will grant you some, or you buy some from him, or at least you enjoy a pleasant smell from him. As for the one who blows the blacksmith's bellows then either he will burn your clothes or you will get an offensive smell from him."
When choosing our friends we should ask ourselves first: Are they going to help us achieve the purpose for which we were brought to life? Or will they take us away from it? Will they desire for us Allah (SWT)'s pleasure or is that completely irrelevant to them and not their concern at all? Are they leading us to Paradise or to the Hell?
Just think about that