Mercury bioaccumulates in the ecosystem. That means higher levels in fish that eat fish, and highest levels in fish that eat fish that eat fish. It also accumulates over a lifetime, so longer lived fish have higher levels.
Farmed fish (in this US mostly tilapia and salmon) have other issues, but mercury isn't a generally concern. For wild fish, the small ones--anchovies, herring, sardines--are low in mercury, along with catfish, pollock, shad, and haddock.
The worst for mercury that are widely eaten are tuna (sushi or steak grade, the species they used for canned tuna aren't as bad), certain types of mackerel, and grouper.