Yeah that was actually the best opening ceremony ever...
Doing something like this yourself is a hefty task, but first, here's what you would need:
A software for tracking
A software for modeling / animating
(optionally something for compositing / color grading)
Luckily, Blender (which is free) can do all those things, but has quite a steep learning-curve. ...
This question is very broad. If you're asking about the workflow to create a 3D-animation such as the example, you would:
Create a storyboard using Photoshop, Illustrator or just pen&paper.
Model the 3D-Assets needed in the according software (Maya, Blender, Modo, C4D, etc.)
Place the 3D-Assets in your scenes and light them, give them a proper material, ...