After Chancellor Cole takes off with Malladus inhabiting Princess Zelda's body on board the Demon Train, Anjean now appears at the top of the tower, apparently still alive. They take Byrne on board the Spirit Train, where Anjean says she was unable to defeat him, since he had a century to train himself. She tells Zelda that once Malladus fully adapts to her body, even the spirits of good won't be able to defeat him. Zelda asks if there's way to force Malladus out for good, and Anjean replies that there was a weapon called the Bow of Light that was used the last time the spirits of good fought against him. It has the power to drive out Malladus' spirit from Zelda's body for good, but she is uncertain of whether Zelda will be able to reinhabit her own body afterward, which makes the princess worry about her fate. Anjean tells her and Link that the Bow of Light is located within the most difficult of all places, the Sand Temple. She gives them a Force Gem that will open up new tracks in the Ocean Realm that will allow them access into the area called the Sand Realm where the Sand Temple is located.
Now that we have some tracks to the Sand Realm opened, let's go find the Sand Sanctuary. Plot your course to the only dead end in that area and get the train rolling along. When you enter the Sand Realm, you'll encounter sand sharks called Malgyorg that will swim through the sand with their fins exposed before they jump up and attack your train. (As an amusing thought, whereas in The Wind Waker you are literally "jumping the shark", here in this game the shark jumps you!) Give them a well-timed cannon blast to stop them once they make the jump. Along the way there's an archway that will come into play very soon.
At the dead end is the station where the Sand Sanctuary is located. This place seems rather barren at first sight: there's just walkways, a few Gossip Stone statues, a stone tablet, and a Bomb Flower. The stone tablet reads something along the lines of sleeping where "the gazes of the two statues meet". Unfortunately, there's just sleeping statues here, so what does that mean? Here's a hint: the walkways of the area are in the same pattern as the tracks of the Sand Realm. So let's hop on the train and do some exploring. Along the way you'll notice two big statues that seem to be gazing at the realm's southern plateau. Returning back to the Sand Sanctuary area, place a Bomb or Bomb Flower where you think the southern plateau would be located in the walkways' representation of the rail map. If placed right, this should blow open a staircase that will lead you down into the Sanctuary.
Inside the Sanctuary is the Sage we're looking for named Rael. He will lead us into a Lokomo Song we need to play as a duet in order to unlock more Spirit Tracks in the Sand Realm that will take us to the Sand Temple. However, before we go, Rael will warn us that there will be three trials that we need to face in order to enter the temple itself.
Getting to the Sand Temple
Now that we have the new tracks opened, let's plot a course into the tunnel that will take us through the winding course to the Sand Temple, where the three trials await.
The first trial
The first trial is the "big eye that looms in the shadows": soon after we enter the tunnel, another "ginormous monster" drops down from the ceiling to chase after us. It's the Rocktite, and this time when it chases us, it will sometimes close its "mouth" so we can't get a good shot of its eye. Fire at one of the explosive barrels that the Rocktite comes near to make it open its "mouth" so we can blast its eye. Other than that, it's pretty much the same strategy: just keep blasting at its eye and keep it from leaping on top of the train.
The second trial
The second trial is navigating the Twisted Tunnels. Most of these tracks are located on the southern part of the Fire Realm, and you won't have any idea of where the tracks are taking you, so it's mostly trial and error figuring this part out. However, there's a simple way of getting through this part:
1. Enter the tunnels through the main entrance.
2. When you emerge, immediately go in reverse as if to backtrack out. This will take you north.
3. When you emerge, go into reverse again. This will now take you east.
4. When you emerge, turn right at the junction and enter the south tunnel. You're now past the second trial!
The third trial
The third trial is the inpenetrable Temple itself. As you get closer to it, you'll notice that it has cannons on all four sides that will fire at you when you approach it. While plotting a circular course around the Temple, blast away at both the cannons and the cannonfire, being careful not to get hit. When the last cannon is destroyed, the gate to the Temple itself will open. You'll now be able to enter.