So here I have a picture of a motor (I think it is a universal motor but I am not sure). My question is if this motor is connected to an A.C. supply, does it have to rotate at the frequency of the A.C. supply? Or will it still work even if the frequency of rotation is different from the frequency of the A.C.? And why?
No, it will rotate at a speed determined by the load. Witness that the current in, and thus the magnetic field produced by the stator coils is either in-phase with or anti-phase with the rotor current, with the $\pi$-phase change triggered by the split ring commutator. So the torque in each half of the rotor's rotation will throb at twice the AC line frequency, but it will always be in the same direction regardless of the phase of the AC. The stator currents produce a magnetic field proportional to $H(t)=\cos(\omega\,t+\delta)$, and the torque on the rotor is proportional to $\tau(t) = I(t)\,H(t)\,\cos(\theta) = H(t)\,\cos(\omega\,t+\delta)\,\cos(\theta) = \cos^2(\omega\,t+\delta)\,\cos(\theta)$, where $\theta$ is the rotor's angular position. The $\cos^2$ term ensures that the torque keeps pushing the rotor until $\theta=0$, at which point, the split ring commutator reverses the phase relationship between the two AC currents. So we see that, overall, the torque is proportional to:
and so is always in the same direction: the time average of $\cos^2(\omega\,t+\delta)$ being $\frac 12$.