Well, in this case we have one C and one N, but yes the two ends rotate relative to each other
Single bonds, i.e. sigma bonds, can rotate (as I'm sure you know). With a double bond rotating it 90° breaks the pi bond so it costs energy. Then when we rotate another 90° the pi bond can form again. This means there is a barrier to rotation. But given enough energy we can make the bond rotate.
The 180° rotation flips between the cis and trans forms