I'm learning Blender so i can use it to do math animation videos, I've been trying to turn a circle into a line so i can measure the circumstance for a long time, and it didn't work sadly :(
One way to do it is to animate the Bevel Factor of a bezier curve that consists of the circle and the flattened line extending at one end.
You start with a bezier circle and turn off Cyclic in the properties panel.
In edit mode, rotate the handles by 45 degrees so that the circle shape is restored. One end of the arc is extruded to the bottom (with its handles rotated horizontally), the other end gets extruded along a line with the length of the circle's circumfence.
Add another curve – either a NURBS or bezier – to act as a Bevel Object. In the example I used a NURBS path with 0.05 length. In the properties of the “circle” select the new curve as bevel object and set the bevel factor mapping to Spline
Add a driver to both Start and End of the bevel factor by right clicking on it and selecting Add Driver > Manually Create Later (Single)
In the F-Curve editor (Graph Editor panel > Drivers mode > Drivers tab) set the drivers variable to the X Location of the circle.
The scripted expression for the Start should be
var / (2*pi) / 2 (as the driver should run from $0$ to $0.5$ as the circle moves from $0$ to $2\pi$. The End expression is
var / (2*pi) / 2 + .5 (running from $0.5$ to $1$).
Finally, you can animate the X location of the circle.
Another approach could be to animate the control points individually. If you go that route, you might want to look into an addon called Animation Nodes. A similar animation using a 3D rope unwinding has been explained in this answer by Omar Ahmad.