How do you attach the text to the background? Such as this video:
Also how do you create the cut-out text from this Jay-Z music video:
Well, it's obvious that you know very little about AE in general, so start here:
Getting started with After Effects
Beyond that do a generic web search on 3D tracking and working with 3D layers.
Retrieving data ...