Riker discovers that eight years ago an exact duplicate of him was created when he beamed through a planet's surface while returning to his starship. However, since Will Riker returned, nobody suspected the existence of the duplicate until the Enterprise's visit.
The two Rikers have a lot to deal with. The duplicate, who decides to use his middle name, Thomas, has to deal with his resentment at having been abandoned, and the fact that his feelings for Deanna Troi are still strong. Will has to deal with feelings of guilt over Thomas' ordeal and jealousy over his lingering feelings for his and Troi's broken relationship.
In the end, Thomas accepts a separate assignment at his eight-year-old rank of lieutenant.