The 'Rotate Sprite' command sets sprite spriteNum rotating at a specified speed for rotAmount degrees clockwise. Once it has started rotating it will continue to do so until it has rotated by a total of rotAmount or you issue it another rotate command.
The speed is specified in degrees/frame, for example passing 1 means move one degree per frame in towards the destination. If you pass in a negative number as the speed, this is instead interpreted as the number of steps to complete the movement in. For example, passing -5 means cover the distance in 5 steps, no matter what the distance is.
If the rotAmount is omitted, then the sprite will rotate at the speed specified in speed forever.