In this episode, Voyager becomes stuck on a "interdimensional reef" as photonic beings from the other dimension attempt contact in the holodeck, meeting the photonic villains of Lt. Paris' "Captain Proton" program who promptly attack them.
During an episode of The Adventures of Captain Proton on the holodeck (a recurring Voyager homage to movie serial adventures), Ensign Tom Paris and Ens. Harry Kim are forced to leave the program running when spatial distortions trap the ship and disrupt their control over the computer. While the command staff of Voyager seek to discover a way to free the ship from the spatial distortions, extra-dimensional aliens who exist in a photonic state cross over from their own dimension through a distortion located in the holodeck. There, they are detected and attacked by Chaotica, who believes them to be from the fifth dimension, and whose holographic (photonic) weaponry - though harmless to humans - is deadly to the aliens.
Eventually, the crew discover the war being waged between Chaotica and the Fifth Dimension and must defeat him by playing out their roles as the fictional Captain Proton (played by Tom Paris), his sidekick Buster Kincaid (Harry Kim), the President of Earth (the ship's holographic Doctor, who is himself a photonic being), and Arachnia, Queen of the Spider People. Captain Janeway allows Paris to convince her to take on the latter role.