Each Titan shifter can access the memories of the previous person to hold that power, seeing the past from the point of view of that person. For example Eren seeing Grisha eat the royal family from Grisha's 1st person point of view. This means that titan shifters can take on the missions and personalities of the previous holder.
The Founding Titan has an amplified version of that power where it can remotely view (and erase) the memories of other Eldians. For example Zeke seeing Grisha eating the royal family from a 3rd person point of view.
The holder of the Attack Titan can also access the memories of future holders of the power.
While Eren has the Founding Titan power, only someone of Royal Blood like Zeke can use it. So since they are touching Zeke is able to use the Founding Titan power to show Eren the past in an effort to turn him by showing the crimes of Grisha.
However Grisha is able to see glimpses of Zeke/Eren in the future watching him, allowing Eren to speak to his father in the past and show him visions of the future. We don't know what Eren showed Grisha or how much of the future Eren has seen.
So the very crime Grisha did that was supposed to turn Eren against him, was in fact done because of Eren's own encouragement and manipulation. Essentially Zeke and Eren have been trying to turn each other and Zeke massively underestimated Eren and Grisha.
What the fuck Ymir is or her realm, I don't know. In the real world Eren is close to death as he was beheaded by a sniper bullet from Gabi.