i expect you would already know about this but religion Islam is majorly divided into two sects , Shias and Sunnis. Now as the definition of the word "sect" in religious terms go , it means being based on something but with notable changes. Shias in particular practice things which are not entirely according to the teachings of Islam , hence the most extremists of Sunnis term them as Kafir and it has always been a thing where a group of Sunnis always have had hatred towards them. (most notable changes for them being the fact that they are believers in Ali being the direct successor of Mohammad even though it is clearly mentioned in the Quran and Hadith that Mohammad was the last messenger of the God , believing in 5 prayers like Sunni but combining and praying them at the same time unlike Sunnis who have designated time slots for them , etc)
As for Ahmediyas , well they are recognized as the Minority in our country and hence , treated as such. To understand it simply , Islam makes us believe that nearing the Judgement Day we will have a Messiah who will rule and unite all of the Muslims who would eventually be Issa (or Jesus , same name) who rose back to the Heaven but Ahmediyas on the other hand however , believe that their "founder" Mirza Ghulam Qaddyani is that said Messiah and his followers believe him to be their saviour and treat his written books and texts on the same level as Holy Quran as well as bad mouth Issa and disregard him as something important even though Issa is/was a very prominent figure in Islam. They even go ahead and sometimes treat Qaddyani as the next prophet after Mohammad , all of these things basically rule them out of the Islamic circle since they are wholly against the teachings and believes of the religions.