Ryan Maloney shows how to attach text or other elements to moving video in After Effects using motion tracking. Open the Tracker panel, position tracking boxes on your marker, create a null object to receive the data, run the tracker, then parent your layer to the null so it follows the motion.
Chapters
Basic motion tracking in After Effects. Motion tracking is used if you want to stick an object to a moving object in video footage. Say you want text to follow around one of these markers. Go to Window, Tracker, select Track Motion, then scale up and move these tracking boxes around whatever you want to track. I'll pick the top of this marker. Then go to Layer and add a new null object. We'll be transferring all the keyframe positions to this null object in a second. Then with your video clip selected, hit the play forward button in the tracker window. It runs for a second. Once it's done, go to Edit Target, select your null, hit Apply, then parent the new object to that null. And that's basic motion tracking.