It is both a joke and a metaphor. I'm going to talk as if you don't have much experience with topology and quotient spaces - apologies if that's incorrect.
Y'know how when we unwrap the surface of the Earth (i.e. a sphere) to make a map, we often "make the cut" through the Pacific ocean? And when you do that, it's possible to think that it really is flat? But if you made the cut along 0 deg longitude (right through Africa and Europe) it would be pretty obvious that the far left of your map matched up with the far right of your map, and in reality they are "pasted together".
Well, that's kinda like what they did with the fish. The way they cut through it it's clear that the ends should be pasted together, and that this image is really just a flattening of a surface that looks like a napkin ring. And has a fish on it.
And a common algebraic way to model this is to take $\mathbb R$, and reduce the numbers "modulo 1", i.e. take just the fractional part, so that $0.23 \sim 1.23 \sim 2.23 \sim 3.23 ...$. You might want to think of this as wrapping an infinitely long piece of ribbon around a short section of a tube left over from a roll of paper towels. And one can also describe this with terms taken from group theory, where $\mathbb Z$ is a subgroup of $\mathbb R$, and this process of identifying points corresponds to constructing the "quotient group", which is written $\mathbb R / \mathbb Z$.
(One technicality is that $\mathbb R$ should, strictly speaking, just be a line - there's not any height available to draw a fish. A more precise version could model the height by the unit interval $[0,1]$, and use cross products to say that the space is $(\mathbb R \times [0,1]) / (\mathbb Z \times 0)$, but that kind of breaks up the flow of the joke, so we take $\mathbb R / \mathbb Z$ as good enough. And trust me, if you've gotten used to seeing the phrase "the reals modulo one", then "the fish modulo one" is pretty funny.)