I suspect this is interaction between fish, males particularly. All characins will "sidle up" (as I like to term it) to each other as a form of display, play, threat, pre-spawning, enticing a female, whatever. They may encircle one another in one spot or as they swim. Some species do this continually, like Nannostomus beckfordi males; Emperor Tetra do it a lot. Cardinals rarely. But I suspect this is what you are seeing. The fish doing it will usually fully display their fins too, dorsal especially; and their colouration will usually be a bit more intense, though this is easier to spot in some species than others.
If your fish is swimming all around te tank on its own and half on its side, that is another matter. I hope not.