If you mean something like this from Stranger than Fiction:
Then you would track the head of the tooth brush, add a null, Apply the tracking info to the null, add your text layer and your pointer using a shape layer and then parent the text and the pointer layer to the null. EZ PZ. The key to success is picking a bit enough target to track that has sufficient detail. This is how I would track the shot and offset the attach point:
If you wanted the text to be stationary then you would still track the toothbrush head and apply the tracking info to a null then use the Beam effect (easiest) on a new solid to attach one end of the beam to the end of the toothbrush. You would use an expression to tie the position of one end of the beam effect to the position of the null. If you needed to offset the attach point of the end of the beam to the toothbrush you could either do that when you track or you could simply type value + to your expression and adjust the position property of the start or end of the beam.
If you have camera movement in the shot then how you attach the text to the moving camera becomes more problematic. You could either use Camera Tracking or Stabilize the shot before you track the toothbrush, then follow the first set of instructions above, then use another null and parenting to move everything back into position.
If you are still completely confused then please give us more details explaining in detail what your shot looks like and what you want the finished product to look like.
Thanks alot for your response. What's different about the effect I want to do is I want the text to be motion tracked if need be to the background and the pointer or line to be motion tracked to the object. The line would adapt if need be in length to the movement of the object. I've seen this sort of thing in car commercials mostly. I think the Zombieland movie may have had it as well.
Depending on the shot you could run AE's camera tracker and add the text so that it was locked to the camera move then track the object you wanted to add the pointer to and attach the start position of the beam effect to the text position and the other end to a null that had the tracker info.
If the camera tracker does not work out then you could stabilize the shot so that some object on the background didn't move then duplicate the stabilized shot, pre-compose the duplicate, then track the object in the shot you want to track. You would then apply that tracking data to a null, copy the null and paste it to the first comp. Then you would add your text layer to the stabilized shot and then add a solid with the beam effect. You would then attach one end of the beam to the null's position and the other end of the beam to the text. You end up with a stabilized shot the null that controls one end of the beam and the text layer stuck to the now not moving background. You add another null to the project and then tie the position of this new, let's call it destabilize, to the anchor point of your stabilized footage, use the keyframe assistant to convert the expression that ties the start end of the beam to the null to keyframes, then parent all layers to the null to put back the camera movement and track the other layers to the camera movement.
Got that? It's kind of confusing. The right technique depends entirely on the shot. If you can put the shot up on YouTube or Vimeo so we can see what you are trying to work with maybe we can give you a better idea.
Here's how to stabilize a shot, add some graphics, and then remove the stabilization using a null and simple expression.
I'm working on a more in-depth tutorial on this subject but it probably won't be up for a few days. In the mean time here's an animation preset that will work with this technique if you stabilize including stabilizing scale and rotation.
Here's another quick tutorial on how to use the camera tracker to add some text to a scene: