It's a zebra danio. One of my zebras did that a month or two ago. Had a twitchy head, slightly crooked neck and could only swim in circles. Because of that it started to get thin (couldn't compete for food enough to eat well) and I put him in a separate tank, where he moped. Eventually I got tired of the moping, and put him back in the main tank. He's almost entirely better now.
So what happened? I don't know. Rough play, maybe. None of my other fish have had this problem. But as long as there are places for it to rest, and if it has a decent chance to feed, I'd leave it where it's at.
All cwt posts are implicitly appended with "just my two cents".