i) The dihedral group $\,D_4\,$ contains either rotations (in integers multiples of $\,\pi/2\,$ , say around an imaginary pivot in the center of the square (= the intersection point of its diagonals), or reflections through one of the symmetry axis of the square (either a vertrical or a horizonal line through the square's middle or through one of the two diagonals).
ii) Example of rotation in an angle $\,\pi\,$ anti-clockwise: we get the following mappings of the vertices:
$$1\to 3\;,\;\;2\to 4\;,\;\;3\to 1\;,\;\;4\to 2$$
You can see that the above symmetry of the square is represented by the permutation $\,(13)(24)\,$ (written as product of disjoint cycles)
iii) Example of reflection, say through the diagonal $\,13\,$ in the square:
$$1\to 3\;,\;\;2\to 4\;,\;\;3\to 3\;,\;\;4\to 2$$
represented by the permutation $\,(24)\,$ ... etc.