The Pyramids, as they are referred to by the Vanguard, are a fleet of massive Darkness-aligned tetrahedral entities. They are the ancient enemy and the antithesis 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.
As discovered by Asher Mir through his experimentation, Pyramids have a defensive mechanism where incoming projectiles appear to simply disappear on the point of impact, while still physically existing in some form. This defense also seems to suppress electromagnetic radiation to a degree, requiring a fully equipped relay system to remain detectable from the outside.
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.
During the Collapse, the Pyramids presumably invaded the Sol System in force, laying waste to the worlds and colonies of the Solar System as they descended upon the Traveler and Humanity, nearly wiping out all of humankind in the process. It was only thanks to the counterattack of the Traveler, that humanity was able to survive and have some of their people be made Guardians, so that hope would still exist for the Solar System in their fight against the Darkness.
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 Pyramid from the fleet was discovered by the Hive 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 upon 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. The Drifter dispatched a special Bank device to collect Energy of the Darkness, while at the same time having Guardians fight off an arms race with the Cabal and the Vex, along with Savathûn’s Taken forces.
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, scuttling the Hive and Fallen in the New Pacific Arcology in an arms race to claim Darkness seeping in blooms from the alien vessels. From the depths of the Pyramid back on Io, a large force of Pyramid Scales were sent out to survey Io's surface, in order to presumably prepare it for terraforming.
With the crippling of Rasputin, the choice was made by Zavala to evacuate the four worlds that had come under threat from the Pyramids. The Young Wolf would aid Zavala, by making final preparations, by completing a list of objectives on each destination in accordance to needs of Sloane, Asher, Vance, and Ana. Though the intention of the evacuation was to have them leave, they chose to do the opposite, with Vance and Asher entering the Infinite Forest and Pyramidion respectively, and Sloane choosing to hold the line against the Pyramid occupying Titan, and Hive. When it came to oversee Ana Bray’s exodus from Mars, the Young Wolf assisted in her attempt to salvage what was left of Rasputin, which resulted in his remains being placed in a specialized Engram. With what remains of Rasputin’s mind preserved, Ana would make her final preparations before departing Mars.