How do you animate something like this?

He wrote his own tools in Python to achieve this (repo: https://github.com/3b1b/manim).

FAQ: http://www.3blue1brown.com/about/