The place used to be a hindu temple some 500 years ago. When the Muslims took over India they built on top of it a mosque. This mosque was demolished and now it was ruled by India supreme court that a Hindu temple will be built in its place. This is a good development for all other places where Muslims took over other religion holy places and built mosques on top of them. Some examples are The Aya Sofia church in Turkey and the temple mount in Israel. https://time.com/5723311/india-hindu-temple-ayodhya/
It's more complicated than just that. Was there a temple there? Maybe? It's not really clear. The claim to the land is based on Hindu idols being found in the Mosque back in the 1950's. Was it divine intervention, or because some Hindus paid off the guards to sneak in at night? The world may never know.
Actually the Church of Aya Sofia is the original. It's 1,500 years old and an architectural masterpiece - especially considering it has withstood quite a few earthquakes. What the Turks did was convert it into a mosque, and Attaturk turned it into a museum. Now the Turks want to make it a mosque again.
I'm kind of glad there is friction between India and Pakistan because of Pakistan's close relationship with Turkey lately. They have been harassing Cypriot merchant ships on Turkey's behalf, and flying its jets together with the Turkish jets over Greek and Cypriot territorial waters. Turkey also signed an agreement with an unrecognized leader of Libya to search for oil and gas in waters that does not belong to them. The situation is extremely serious in that Erdogan wants nuclear weapons, and Pakistan will probably help him develop them. This is going to endanger quite a few countries in the area as well as Europe, since Erdogan's desire has always been to restore the Ottoman Empire.