The Pah-wraiths were non-corporeal beings and enemies of the Bajoran Prophets. Bajoran religious texts related that the Pah-wraiths once resided in the Celestial Temple alongside the Prophets. For reasons unknown, they were banished to the Fire Caves on Bajor. According to ancient Bajoran texts, they were "false Prophets". The name "Kosst Amojan" was sometimes used to refer to them.
The Pah-wraiths typically took the form of fire spirits (from which they got their name). Other than that, they were virtually identical to the Prophets. They could induce visions in corporeal beings, appearing as familiar figures as the Prophets did in such visions. However, the Pah-wraiths in such visions acted smugly, whereas the Prophets displayed very little emotion. (DS9: "'Til Death Do Us Part") They were vulnerable to high levels of chroniton radiation. This was discovered in 2373, when a Pah-wraith took over the body of Keiko O'Brien and attempted to destroy the Prophets by firing a chroniton beam directly at the Bajoran wormhole, only to be foiled and destroyed by Keiko's husband, Miles O'Brien. (DS9: "The Assignment")
A year later, one of the Kosst Amojan took over the body of Jake Sisko on space station Deep Space 9, in order to fulfill the ancient prophecy of "The Reckoning". The entity was driven out after Kai Winn Adami flooded the station with chroniton radiation before the battle was completed. (DS9: "The Reckoning")
In the same year, Gul Dukat released a Pah-wraith from an ancient artifact, which then took over his body and used him to get to the Orb of Contemplation on board Deep Space 9. Jadzia Dax happened to be in the shrine at the time, and was fatally wounded by the Pah-wraith. The Pah-wraith was then released into the Orb, allowing it access to the wormhole and collapsing the entrance on the Alpha Quadrant side, starting a war between the Prophets and the Pah-wraith. (DS9: "Tears of the Prophets")
In 2375, Benjamin Sisko received visions from the Pah-wraith, during his quest for the Orb of the Emissary, in an attempt to confuse him from what the Prophets wished him to do. It failed and Sisko opened the vessel containing that orb, reopening the Bajoran wormhole. (DS9: "Image in the Sand", "Shadows and Symbols")
The imprisonment and release of the Pah-wraiths was detailed in the Book of the Kosst Amojan and the legend of the Kosst Amojan. Followers of the teachings of the Pah-wraiths joined the Cult of the Pah-wraiths. Dukat posed as the Emissary of the Pah-wraiths in 2375, on board the abandoned Cardassian space station Empok Nor. (DS9: "Covenant")
In the same year, Kai Winn received visions which she initially believed to be from the Prophets, only to learn that it had been the Pah-wraiths that had been communicating with her. (DS9: "Strange Bedfellows")
Dukat, in disguise as Anjohl Tennan, then convinced her that the Pah-wraiths were the true Prophets, and that they had to be released from the Fire Caves. She agreed, and consulted the Book of the Kosst Amojan. (DS9: "The Changing Face of Evil")
Later that year, Sisko tried to stop the Pah-wraiths. However, they resurrected Dukat with near-omnipotent power. Dukat revealed the Pah-wraiths' plans to Sisko: to spread from Bajor in all directions, burning the universe in their wake. In order to stop them, Sisko threw himself, Dukat, and the Book of the Kosst Amojan into a fire pit, sealing the Pah-wraiths forever in the Fire Caves. (DS9: "What You Leave Behind")
List of Pah-wraiths
According to the script for "The Assignment", their name was pronounced as "PA-rayths". 
The Pah-wraiths were originally conceived during the writing of the first season episode "The Nagus". In that episode, Sisko and Jake are supposed to visit the Fire Caves on Bajor, and there was a line in the original teleplay where Sisko was told jokingly to "watch out for the Pagh-wraiths." The Pagh-wraiths were Robert Hewitt Wolfe's idea and were supposedly little goblin creatures that lived in the Fire Caves. This line was omitted from later drafts.
While developing "The Assignment", René Echevarria was trying to come up with a concept that would tie into the Deep Space Nine mythology. He didn't want the being who possesses Keiko to simply be some random entity, but rather something that would fit into the overall scheme of the show. Unaware of Wolfe's original idea, he suggested that perhaps the aliens in the wormhole weren't all good, and that there were in fact some evil members of the race. Wolfe then proposed a revival of his Pagh-wraiths concept. (Star Trek: Deep Space Nine Companion (p. 389))
The scripts consistently used the spelling "Pah-wraith".   However, Wolfe maintains that "Pah is a misspelling, from my point of view." (Star Trek: Deep Space Nine Companion (p. 389)) Ronald D. Moore has also commented that he believes that "pagh" was the correct spelling. (AOL chat, 1998) "The Assignment" co-writer David Weddle countered, "Not if it comes from Ancient Bajoran. The g's were added centuries later, when the seventh hemisphere became more influential." (Star Trek: Deep Space Nine Companion (p. 389))
According to René Echevarria in the Star Trek: Deep Space Nine Companion (p. ?), the Kosst Amojan was not referred to as an individual. The term was always referred to using the article "the", as in "the Kosst Amojan". Thus, it may not be the proper name of an individual, rather the name of an object or the title of a group.
In the first draft script of "The Changing Face of Evil", Dukat speculated about how the Pah-wraiths would judge the Bajoran archivists, remarking, "Something tells me that when the Restoration occurs, the Pah-wraiths are going to find those librarians... unworthy."
During the Millennium trilogy, the crew discovers the existence of a third group of Prophets, with this third group representing the alleged "True" Prophets who reside in an initially inactive red wormhole while those in the blue wormhole represent a splinter faction who broke away to explore the possibility of a world outside their realm, the Pah-wraiths being those who were banished from both groups and now seek to reunite the Temples so that they can destroy everything that those responsible for their exile have created.