As dusk fell, Devaputra Mara, the chief of all the demons, or maras, in this world, tried to disturb Siddhartha’s concentration by conjuring up many fearful apparitions. He manifested hosts of terrifying demons, some throwing spears, some firing arrows, some trying to burn him with fire, and some hurling boulders and even mountains at him. Through the force of his concentration, the weapons, rocks, and mountains appeared to him as a rain of fragrant flowers, and the raging fires became like offerings of rainbow lights.
Seeing that Siddhartha could not be frightened into abandoning his meditation, Devaputra Mara tried instead to distract him by manifesting countless beautiful women, but Siddhartha responded by developing even deeper concentration. In this way he triumphed over all the demons of this world, which is why he subsequently became known as a “Conqueror Buddha.”
With this concentration he removed the final veils of ignorance from his mind and in the next moment became a Buddha, a fully enlightened being.
Source: About Buddha