Rotating is simpler than it looks: there is one moment when your team moves, and one direction.
When you rotate
A team rotates only when it wins a rally that the other team served (rules 6.1.3.2, 7.6.2). If your team served and wins the rally, nobody moves and the same player serves again (rule 12.2.2.1). If you lose a rally, the other team serves, and you don’t rotate either.
Which way
Rotation goes one Position clockwise: the player in Position 2 moves to Position 1 and serves, 1 moves to 6, 6 to 5, 5 to 4, 4 to 3 and 3 to 2 (rules 7.6.2, 12.2.2.2).
The service order
The order on the court never changes during a set, so players serve in the order of the Lineup (rule 12.2.1). After six Rotations everyone is back in their starting Position.
If the wrong player serves, it’s a rotation fault: the other team gets the point and the serve (rule 7.7.1).