When Prison Realm enters the battlefield, exile target creature or planeswalker an opponent controls until Prison Realm leaves the battlefield.
When Prison Realm enters the battlefield, scry 1.
Auras attached to the exiled permanent will be put into their owners’ graveyards. Any Equipment will become unattached and remain on the battlefield. Any counters on the exiled permanent will cease to exist. When the card returns to the battlefield, it will be a new object with no connection to the card that was exiled.
If Prison Realm leaves the battlefield before its first triggered ability resolves, the target permanent won’t be exiled.
If a token is exiled this way, it will cease to exist and won’t return to the battlefield.
You’ll still scry 1 even if Prison Realm’s first ability has no legal target or if that target becomes an illegal target before the ability resolves.