Why is a reflection followed by another reflection is a rotation? I just started abstract algebra and we are working with dihedral groups. I've made Cayley tables for D3 and D4 but I can't explain why two reflections are the same as a rotation

Consider the dihedral group $D_5$, and consider its action on the pentagon. In particular, every element of the group can be thought of as some combination of rotations and reflections of a pentagon whose corners are labeled $1,2,3,4,5$ going clockwise.
First, notice that no matter what we do, the numbers will be in the order $1,2,3,4,5$ in either the clockwise (cw) or counterclockwise (ccw) direction. 
If our change switches the order from ccw to cw (or vice versa), then we must have reflected the image.  On the other hand, if no such change occurs, then we must have rotated the image.
Note that reflecting twice results in switching from ccw to cw, then to ccw.  So, the numbers still go $1,2,3,4,5$ in the ccw direction.  So, we must have rotated the image.
