Usually, they get wiped out by a civilization more advanced than them. The Aztecs were destroyed by the Spanish. We don't know exactly what happened to the Mayans.
A bad example of going backwards is when the Christians took over after the Roman Empire collapsed and dissolved. The cost of Christians rejecting the scientific method and squashing new ideas that went against what they thought was a holy text was terrible. We have the Greeks and Romans performing basic brain surgery, then, once the Christians were given power, our best methods to cure illness were bleeding people out and performing exorcisms. The ancient word had the plague, but were able to keep the loss of life relatively low and get rid of it. When the plague hit Christian-controled Europe, their years of killing people with different ideas caught up with them. Their Bibles, prayers, and exorcisms were no match for something that could only be controlled through actual knowledge. They had no idea what to do and we lost a third of the population of Europe.
So yes, sometimes we lose an advanced civilization and take a huge step backward. We had to learn that terrible lesson at the hands of the science-rejecting, Bible-thumping Christians. We had 1,500 years of almost no scientific advancement because of them. The problem is, they have recently started attacking science again. Hopefully, this time we won't let them.