The joke is a pun. 'Haddock' is a type of fish, and sounds like 'headache' which is a pain in the head that one might take pain relieving pills for.
A fisherman took pain pills because of a persistent haddock .