Here we talk about the Spirit World, Raava, and Vaatu
In the avatar universe there are 2 worlds, the physical world, and the spirit world. The portals to the spirit world are on each end of the world (the southern water tribe and the northern water tribe). On the other hand the portals to the physical world are close by each other with the tree of time in between them. when avatar wan fused with Raava he became the first avatar and he captured Vaatu and locked him in the tree of time, then he closed the portals to permanently separate the two worlds, he did all of this in Harmonic Convergence which comes every 10,000 years where all the planets in the galaxy line up in a single file which creates an absurd amount of spiritual energy allowing the the two worlds to collide if both portals are open. Avatar Korra was forced to open the portals by Unalaq at Harmonic Convergence which let Vaatu out of his cell and for vaatu to collide with Unalaq. Unalaq turns into the new dark avatar but just in time Jinora helps Korra defeat him. The fight resulted with the spirit world colliding with the physical world.
Picture of Raava containing vaatu before fusing with avatar wan
Raava is the light spirit, and she had to contain Vaatu, the dark spirit, to stop all darkness from happening, and with the help of Avatar Wan (the first avatar) they trap Vaatu in the tree of time, After that, Raava Fused with Wan creating the Avatar cycle where they tried to restore peace, when Wan died Ravaa went on to another avatar and the cycle continued, until Avatar Korra, when defeating Unalaq and Vaatu, Korra's connection with the previos avatars was severed, meaning she couldn't talk to them like how Aang could, whats worse is in a comic book about Korra called The Avatar Chronicles, it is revealed that the coming avatars would not be able to comunicate to any of the past avatars including Korra.
"I lived ten thousand lifetimes before the first of your kind crawled out of the mud. It was I who broke through the divide that separated the plane of Spirits from the material world. To hate me is to give me breath. To fight me is to give me strength. Now prepare to face oblivion!"
— Vaatu
Vaatu is the spirit of darkness and chaos, who briefly became the Dark Avatar Spirit during the Harmonic Convergence of 171 AG. He is one of the oldest known spirits, having existed over ten thousand lifetimes before the appearance of the first humans. He was the first spirit to cross over into the mortal world, breaking down the barrier that separated it from the plane of spirits and creating the Northern and Southern spirit portals in the process, enabling other spirits to do the same. His essence swayed the spirits to the dark side, transforming them into dark spirits.