Keyframing the animation would give you the greatest degree of control.
However, that is usually unnecessarily complex, and in the example that you posted I would guess the artist used something similar to After Effects' expressions. These allow you to set up animation based on simple math and logic rather than through keyframing.
For example, you could create an expression that forces a camera to always point at the anchor point of a specific layer. The following would return the anchor point's position in world coordinates of the layer "SpecificLayer," if you applied this to the point of interest of the camera then it would always point at this location:
l = thisComp.layer("SpecificLayer");
This is advanced AE stuff, so if you're not familiar with simple programming/scripting it's going to take you a good amount of time to understand the way this works. If you're new to AE then it's going to take even longer :(