The Pyramids, as they are referred to by the Vanguard, are a massive fleet of Darkness-aligned tetrahedral entities. They are the ancient enemy of the Traveler, and were responsible for the Collapse on Earth.
The Pyramids are closely associated with the Darkness, and are even sometimes referred to as "the Darkness" themselves. However, available information suggests that the Pyramids are nonetheless distinct from the Darkness in a similar way as the Traveler is distinct from the Light. The Pyramids are the ancient enemy of the Traveler, and have actively tracked it through the cosmos for countless eons, bringing destruction to the very civilizations its uplifted either directly or through their agents like the Vex, Hive, Scorn, or Taken. 
The Pyramids vary widely in size, ranging from city-sized "flagships" to smaller but nearly identical vessels closer to the size of a Fallen ketch. They all share a tetrahedral shape, broken up by lines of yellow-orange lights. They are accompanied by fleets of smaller entities known as Pyramid Scales; about the size of a jumpship, these objects are hexahedrons with floating dagger-like extensions extending from their undersurface, and are made of the same chiseled obsidian-like material as the larger Pyramids.
Based on the Guardian's exploration of the Pyramid on Luna, the Pyramids have interior spaces apparently designed for human-scale inhabitants, with hallways, stairs and rooms. The Pyramid on Luna contained a massive sculpture of what appears to be a veiled female humanoid figure, the significance of which remains unclear.
The Ancient Past
The origins of the Pyramids are unknown. They have presumably existed for at least as long as the Traveler; the Books of Sorrow allude to the Darkness laying waste to solar systems, suggesting that the Pyramids may have been active during the rise of the Hive.
After the death of Dominus Ghaul at the hands of The Guardian, the Traveler reawakened and sent a pulse of light throughout the Sol System, and eventually the outer reaches of the Milky Way, waiting outside of the galaxy was the Pyramids, as the pulse washed over the fleet, they reactivated and began moving en masse to the Sol System.
Nightmares on Luna
A single, seemingly derelict vessel from this fleet was discovered beneath the surface of Earth's Moon in the years following the Red War. It remains unknown how long this vessel was buried on the Moon, although Eris Morn speculates that it may have been struck down by the Traveler during the Collapse, or left behind intentionally. Its very presence creates Nightmares from the Darkness to haunt the Traveler's Light-bearing Risen.
The Darkness Descends
Around the time of the Almighty's descent upon The Last City, the Pyramids themselves had finally reached the outer Solar System and were approaching from all sides. At first, the fleet consisted of one lead Pyramid and seventeen smaller ones, numbering in eighteen total. As the ships passed through the Kuiper belt, the number increased to thirty two. Seven additional Pyramids arrived, with the fleet itself approaching Neptune. The following week, the fleet increased to forty-three and begun to make their way towards the inner system while the lead Pyramid held position above Neptune. The fleet next set its sights on Uranus, now forty-nine in numbers, and was on its way to reaching Saturn. Uranus was swiftly taken as the fleet had now grown to fifty-one vessels strong.
Eventually, the fleet increased to fifty-four vessels, though it is possible there may be other Pyramids that are undetected or have yet to reach Sol. With Pluto, Neptune, and Uranus claimed by the Darkness, the Lead Pyramid and the rest of the fleet have set their sights on Saturn and its moon of Titan. This was all observed by Rasputin from his Seraph Bunkers who shared this information to the Vanguard. All the Guardians and Rasputin could do now was wait in anticipation for the Darkness to descend.
Unbeknownst to Rasputin, however, another Pyramid, one much larger than the one buried on the Moon, had broken off from the main fleet and descended up the inner system undetected. By the time of The Almighty's destruction, this Pyramid had reached Jupiter and made its way towards Io along with its escort fleet of Pyramid Scales.
Several days after The Almighty's destruction, the Pyramids had reached the inner system. Alarmingly, many of these Pyramids appeared on worlds that were nowhere near where Rasputin had detected them. It is unknown if these vessels had broken off from the main fleet or if they are new ones who were arrived in the system undetected. One of these Pyramids slipped through the Asteroid belt and arrived on Mars. In a similar fashion to the attack on The Almighty, Ana Bray deployed satellites against the Pyramid in hopes that it would be destroyed. However, the Pyramid remained undamaged and continued its approach on the red planet, also managing to disable the Warmind and render the Warsat Network entirely useless.
Meanwhile, back in the outer system, the Io Pyramid had touched down near the Cradle and begun deploying its Pyramid Scales in the Echo Mesa nearby. Eris Morn departed for it as soon as it arrived, resulting in Zavala tasking the Guardian to investigate the Pyramid and retrieve Eris. As the Guardian approached the vessel, the Darkness possessed their Ghost and brought them closer to the Pyramid. However, the Guardian was pulled into the Ascendant realm by Savathûn, the Witch-Queen. After fighting through numerous Taken and Hive, the Guardian finds Eris in the center of the Cradle, where a Tree of Silver Wings, spawned by the Traveler's Light, was situated inside. Over the course of the week, the Pyramid continued to corrupt Io, deploying Pyramid Scales and infesting the planet with Darkness.
Almost a month after the arrival of the first Pyramid, three more touched down on Titan, Mars, and Mercury. The Titan Pyramid was the first to start deploying its Pyramid Scales, antagonizing the Hive and Fallen in the New Pacific Arcology.