Fish can move in all directions. Because the function of the muscles attached on either side of the spine. The contraction of the muscles of one side starting from the head to the tail. And a wag of the fin. The head and tail to one to one. Pectoral fin and pelvic fin which is comparable to the front legs and the rear legs of livestock, respectively.