Opening the realm of RealixEdit
To open the portal of Realix, the four pieces of the Codex must be brought together and a spell needs to be used. The balance between Light and Darkness must be respected to open the portal, which is why Darkar had Bloom kidnapped and turned her into Dark Bloom.
One Codex is hidden at Alfea in the hidden archive, protected by the pixie Concorda. The second Codex at Cloud Tower is hidden in the heart of the tower, guarded by Discorda. The third at Red Fountain is hidden in a weaponry base, kept hidden by The last piece of the Codex is in Pixie Village, part of the pixie's queen's sceptre, guarded by the Pixie Queen herself, Ninfea.
Lord Darkar originally thought that the Codex was in the Pixie Village, but after gathering information through Karborg he found that it consisted of four pieces: one in each of the three schools of Magix and a fourth piece in the Pixie Village. Each of these pieces were protected by a Guardian Pixie.
Throughout Season 2, Lord Darkar obtained the pieces of the Codex of Red Fountain, Cloud Tower and of the Pixie Village with the help of the Trix, while he got the Alfea Codex through Bloom, whom the clone of Avalon that Darkar had sent to Alfea had temporarily infecting her with a Dark Virus, turning her into Dark Bloom for the first time.
Faragonda had a copy of each Codex piece made after Lord Darkar's return in Season 2 as a precaution in case he managed to get hold of the pieces found in the three schools and at the Pixie Village, which indeed happened. When Lord Darkar kidnapped Bloom and turned her into Dark Bloom, he then opened the portal of Realix with her help and after entering that Realm sealed the Portal. Later, the Winx arrived to Darkar's Fortress in trying to save Bloom but were unable to enter Realix. The Guardian Pixies then used their Codex copies to open another Portal, but they had to solve the Puzzle of the Codex, which was a riddle they had to solve so as to open the Portal. The Puzzle was in the form of many color strips which had to be arranged in a specific pattern, which Stella did by following her fashion instinct and hence opening the Portal.