A scientific name most commonly becomes a junior synonym when it is realized that one scientist has described a fish species that another scientist has already described. With a very few (and obscure) exceptions, the oldest name for a species has priority.
So, for example, you describe Whatever whatever Andrew, 2002 and I describe Whatever somename Shane, 2008. In 2010 Li reviews all fish of the genus Whatever and concludes that the two species you and I described are in fact one and the same.
Since you described the species first in 2002 Whatever whatever Andrew, 2002 remains its valid scientific name and Whatever somename Shane, 2008 becomes a junior synonym of Whatever whatever. Make sense?
Now in 2012 Josh conducts a review of the family Whatidae, to which Whatever whatever belongs, and decides that Whatever is not a valid genus and all fishes in it should be moved to Somethingelse. Now the fish you described becomes Somethingelse whatever (Andrew, 2002). The parentheses around (Andrew, 2002) tell us that someone has moved this fish to a different genus since you described it in 2002.
Now your fish has two synonyms
Whatever whatever Andrew, 2002
Whatever somename Shane, 2008
Somethingelse whatever (Andrew, 2002)
In reality it is often more complicated as, for example, Megalodoras uranoscopus (Eigenmann and Eigenmann, 1888) has at times belonged to the genera Doras, Hoplodoras, Oxydoras and Pseudodoras.
-Shane