It looks like its intestines has pushed out its butt.
It normally goes back in by itself but if it hasn't after a day, you can carefully catch the fish in a net and keep it in the water. Then very gently run your finger along the underside of the body. Do this a couple of times and it might help. But be very careful because you can damage the fish if you are rough.