Ruins were the remains of a building or a city that has fallen into partial or total disrepair.
By the 23rd century, several planets where the native civilizations had become extinct, were covered with ruins, including M-113, Exo III, the home of the Guardian of Forever, and Camus II. Sometimes, those ruins were studied by archaeologists. (TOS: "The Man Trap", "What Are Little Girls Made Of?", "The City on the Edge of Forever", "Turnabout Intruder")
In the 23rd century, Roger Korby translated medical records from the Orion ruins. (TOS: "What Are Little Girls Made Of?")
In 2261, archaeologist Robert Crater and his wife Nancy began an expedition on M-113 to conduct a survey of the planet's many ruins. (TOS: "The Man Trap")
In 2269, the USS Enterprise received a distress call from a group of scientists studying the ruins of the dead civilization of Camus II. (TOS: "Turnabout Intruder")
Even when a planet was still inhabited by its native species, ruins of previous times could exist. Examples of this were Argo, Sarthong V, Tagus III and Bajor. (TAS: "The Ambergris Element"; TNG: "Captain's Holiday", "Qpid"; DS9: "The Reckoning")
In 2369, the ruins of a Rokai provincial capital were discovered on Tartaras V. (DS9: "Q-Less")
In 2381, Beckett Mariner retrieved a golden idol from the ruins of an unidentified location while fending off a trio of Ferengi grave robbers. (LD: "The Stars At Night")
Around the year 3074, an artifact buried nine meters beneath the ruins at Kesef was uncovered by a Kyrian research team. The artifact was a data storage device which came from the USS Voyager. It was later discovered that artifact 271 was the EMH backup module, a backup copy of The Doctor. (VOY: "Living Witness")