Depiction in the series
Princess Celestia describes King Sombra as a unicorn whose heart is "black as night" who took over the Crystal Empire. In a flashback, Sombra looks down from his palace on a chain-gang of Crystal ponies, when two silhouettes of Celestia and Luna shoot a beam at him that turns him to "shadow" and banishes him to "the ice of the arctic north". Celestia says he was able to put a curse on the empire, which caused it to "vanish into thin air". Celestia demonstrates that if the empire is filled with hope and love, then they are reflected across all of Equestria, but if hatred and fear take over the Crystal Empire, black crystals sprout from the ground. When Celestia creates the black crystals, her horn is engulfed in black mist and her eyes glow green and emanate the purple smoky trail the same way Sombra's eyes do.
Twilight Sparkle and her friends travel to the Crystal Empire to defend it under the order of Princess Celestia. When they arrive in the frozen north of Equestria they meet with Shining Armor on the outskirts of the Crystal Empire. Sombra rises as a cloud of black smoke behind them and pursues them through the snow. Shining Armor confronts Sombra and shoots a beam at him, which Sombra's "head" evades and lets the beam pass through the black cloud. Sombra then charges Shining Armor, and the scene cuts right before they clash. Twilight and her friends pass safely through the barrier and arrive in the Crystal Empire, shortly followed by Shining Armor, whose horn is now encrusted with black crystals which prevent him from using magic. When they meet Princess Cadance, Shining Armor explains that Cadence is using her magic to "spread love and light" to protect the Crystal Empire, and that King Sombra countered Shining Armor's protection spell.
Later in the episode, Twilight and her friends interview some Crystal Ponies. One pony who Twilight interviews tells her that she can't seem to remember anything before King Sombra came to power, and flinches while a superimposed image of King Sombra's eyes flashes over her, then she says she doesn't want to remember anything about his rule.
When Cadance's magic starts to fade, Sombra approaches the barrier, but his horn is sheared off as the barrier rises again. It falls to the ground and transforms into a black crystal which embeds itself in the ground and begins spreading to the crystal gates of the Empire.
Twilight performs "a little trick Celestia taught [her]", which gives her the same green glowing eyes and horn engulfed in black mist as Celestia did at the beginning of the story. She turns the throne black with this spell, and slowly makes the throne room look the way it did when King Sombra ruled. She finds a hidden staircase, and at its bottom is "a doorway that leads to your worst fear", created by "King Sombra's dark magic." When Twilight is under the spell, she has the same green eyes as Sombra, and sees herself back in Canterlot where Celestia tells her she has failed to stop Sombra; Spike wakes her from this state, but then falls into it himself and his eyes change the same way, seeing Twilight abandoning him, and Twilight wakes him in turn.
Eventually, Twilight and Spike find the Crystal Heart, but Sombra, able to invade once Cadance is no longer able to perform her spell, traps Twilight in a wall of dark crystals, as well as counteracting her teleporting ability. Twilight tells Spike to take the Crystal Heart to Cadance. At first Sombra advances as a pillar of black smoke, and he materializes as his unicorn self at the end of it right as he's about to take the Crystal Heart from Spike, but Cadance, propelled by Shining Armor who threw her at Spike, snatches Spike and the Crystal Heart. With the return of the Crystal Heart, the Crystal Empire is restored to its former glory, and Sombra is turned to crystal and shattered to pieces in a flash of light, along with his dark crystals.
Role in the series
King Sombra is soon to seek revenge on Twilight and Spike for taking the Chrystal Empire from him, as well as Spyro for defeating him in the City of Benevolence before he almost struck him down after Spyro challenged him to a battle. Sombra is later revealed to be an old ally of Pitch Black the Boogeyman, and was said that Pitch had taught him his black magic before he took over the Crystal Empire thus making him Equestria's Greatest enemy # 5. He will eventually team up with Pitch again and tutor a black sorceror named Deadmemory, who is one of the blackest sorcerors in the UUniverses.