I have friends who are not muslims. Sometimes they make fun of islam and we go into discussions but i feel like sometimes they just want to insult muslims. 2 of them are atheists and another one is a christian. They ask the same questions/claims repeatedly but always jump from one question to another before i can fully answer. Maybe they dont really care about the answer. It hurts when they make claims about the prophet and allah and other muslims. Are they wrong to do this or am I just lacking?
Your friends lack good manners and it would be best to find more civilized friends even if it was not a religious issue.
The Quran says:
He has revealed to you in the Book that when you hear God’s revelations being rejected, or ridiculed, do not sit with them until they engage in some other subject… (From the Quran, verse 4:140)
The Quran therefore recommends that you avoid such people. Make it clear to them that you will avoid them if they bring up Islam with the aim of making fun of it, and if they continue, then stop befriending them.
What said islam about having friends with different religions or even atheists ones? I know that we have to respect the opinion of each one but can we be closer freind?
When referring to interacting with non-Muslims, the Quran says:
As for those who have not fought against you for your religion, nor expelled you from your homes, God does not prohibit you from dealing with them kindly and equitably. God loves the equitable. (The Quran, verse 60:8)
The Quran does not have anything more specific than that to tell us and does not define limits on friendship, which can be taken to mean that it leaves it to our own judgment. One non-Muslim can have a beneficial influence on you while another may have a harmful influence. So they should be judged just like we judge Muslim friends. If we find that our character is harmed by association with them, then it does not make a difference whether they are Muslim or non-Muslim.
However, it is not good to befriend an atheist who has a snarky attitude toward religion, or a non-Muslim who dislikes and looks down on Muslims. But this should be obvious.