The story appears in some biographies and commentaries written generations after the Prophet's time. It says that when the Prophet ﷺ recited the chapter of the Star, Satan put on his tongue words that praised Al-Lat, Al-'Uzza and Manat, that the Meccans were pleased and prostrated with the Muslims, and that Gabriel later told him it was not from Allah. Those who tell it attach it to a verse saying that Satan interferes with the recitation of every messenger and prophet before him, but Allah abolishes what Satan proposes.
Most Muslim scholars rejected it for several reasons. The reports are not found in the two most authoritative collections, and many scholars who examined their chains found them broken or unsound. More important, the passage itself condemns these three goddesses as only names which your forefathers and you have named, for which Allah sent down no authority, and the Quran declares itself protected, so that falsehood cannot approach it from before or behind, and that Allah is its guardian. A recitation that praised idols would contradict the message of the chapter which it was said to be inserted in.
The authentic report about that chapter, in Sahih al-Bukhari, is simpler. Ibn 'Abbas said that the Prophet prostrated when reciting it, and the Muslims, the idolaters, the jinn and the humans prostrated with him. Muslims explain the verse about Satan's proposal as a statement that every prophet faces opposition and temptation to doubt, which Allah overcomes, and not as a statement that false words entered the revelation. For fairness: some classical scholars noted that the story has many chains and tried to explain it in other ways, and critics have used it against Islam. This answer gives the position of most scholars and the reasoning for it.