A 90 degree counter-clockwise rotation is being done on the black figure to get the red figure.
The algebraic rule for a 90 degree counter-clockwise rotation is
For instance, the point C = (0,1) moves to C' = (-1,0), which is shown in the graph given and also you can use the rule above to get the same coordinates. The other points A,B and D follow the same rule.
Side note: the rotation is centered at the origin (0,0). This point is fixed.