First you have to know what the Law of Conservation of Energy is, which is the following: Energy can't be created or destroyed, only transferred and changed
So the fish eats the food, and then the body will then digest the food, converting it into usable energy for the fish. Keep in mind the fish isn't making energy, it's taking the energy from the plant or other fish that it ate. When the fish swims around the energy it got from eating its food gets transformed into kinetic energy (aka movement)
Hope this helped! Let me know if I need to clarify anything or explain anything more in depth!