The Pillars were advanced devices created by the Transformers, most notably Sentinel Prime. These extremely advanced pieces of technology were used to transmit an artificial space bridge between the Moon and Earth to transport military weapons, war machines, star ships, vehicles and troops, as well as refugees, items and more.
Dark of the Moon film
Their supposed purpose was to be used to turn the tide of the war on Cybertron, but in reality, Sentinel Prime had made a deal with Megatron to find an inhabited planet and enslave its occupants, using them to rebuild Cybertron.
The Decepticons soon tracked down and raided the Ark in the 1960's after it crash-landed on Earth's moon and removed hundreds of pillars from the crash site, but Sentinel Prime, the only one who could control the pillars, had gone into stasis from lack of Energon, so they left him in the crash vault with five pillars, including the control one that triggers everything until such time as they could revive him.
In 2012, Optimus Prime and Ratchet used the Xantium to travel to the Moon in order to search the Ark's crash vault in which they found Sentinel Prime, who was still in stasis, along with five of the pillars including the Control Pillar. They were then brought back to Earth.
Once they arrived on Earth back at the NEST base, Charlotte Mearing, the Director of National Intelligence, orders the pillars to be locked away until they know what they're dealing with, much to Sentinel's dismay.
After revealing his true colors and killing Ironhide, Sentinel stormed into the NEST base and took the pillars from the vault. The following night at the National Mall, he used the pillars to transport a Decepticon army from the Moon to Earth.
Soon the Decepticons occupied Chicago and sets up the Pillars on top of the Hotchkiss-Gould where they planned to transport Cybertron into Earth's atmosphere.
At Sentinel's instructions, the Decepticons began spreading the hundreds of pillars around the world and soon the pillars were launched activating the space bridge which began to materialize Cybertron over Earth.
During the battle that followed, Optimus used Shockwave's arm cannon to knock out the control pillar and began fighting Sentinel to prevent him from re-activating the pillar.
The Decepticon's only surviving human operative Dylan Gould fought with Sam Witwicky and managed to jump-start the pillar but Sam killed Gould by knocking him into the Control Pillar, electrocuting him. The pillar was then destroyed by Ratchet and Bumblebee, shutting off the space bridge and destroying Cybertron.