I bet you're new at AE, and you're trying to use it intuitively. That's never gonna work: you really do need to begin at the beginning. And here's a great place to start.
In that link you'll find information on motion tracking, which is what you're after... and more importantly, you'll learn the concepts behind AE so it makes sense.
If you have a moving camera and you want to attach a layer (cgi element) to a spot on the video you have 4 choices.
All require you to know what your doing. The best option depends entirely on the shot, and since we have not seen the shot I cannot tell you which technique to try first. To get a specific answer to your question you need to ask a specific question that outlines the details of your project.