He's sick. Likely a swim bladder infection or if he has spots on him, fish disease called ich.

You can treat him or he'll die eventually. Does he have filration? Regular water changes and dechlorination?