Right click on your footage layer (either in the comp window or the timeline) and choose track motion from the context menu.
That will open up the layer in the layer viewer
and add a motion tracker to the layer.
It should also open the tracker pallette window. If it doesn't, open it from the window menu. Alternatively if the Tracker pallette is already open you could start tracking the layer by selecting the layer and hitting the Track Motion button in the pallette. Or you could choose Animation>Track Motion from the menu.
In the Tracker Pallette there are a few controls. The Motion Source drop down determines what layer we're tracking, the Current Track drop down lets us choose if there are multiple trackers on the layer (you can have as many as you want), and the Track Type drop down lets us choose what to do with our tracking data when we apply it. You shouldn't have to change any of these for your purposes, but it's good to know what they do.
Transform will apply the tracking data to the positon, rotation and scale properties of the target layer, depending on the checkboxes below. The other modes include stabilise - to use the tracking data to stabilise the layer, or the perspective and parallel corner pin modes which let you apply the track to a corner pin effect on a layer, which is useful when you're doing something like putting in the contents of a screen, or covering a graphic on a wall. Raw tracks just give you the track points as they are, without transferring it to the position/rotation/scale of another layer.
Finally the Edit Target button will determine to which layer the track is applied. This should be the only setting you need to change.
So for your purposes you need just the position checkbox checked. This will give you only one track point. In the layer window drag the trackpoint to the object you're tracking. Find a unique feature if you can, and preferably one that doesn't get obscured. It's also best if the entire area of the trackpoint is on the tracked object, and does not include any background. You can drag the corner handles of the inner box to increase or decrease the size of the tracked point.
The outer box is the search area - it defines where the tracker will look for the trackpoint. Make this box big enough so that the movement between frames will fit into it, but no bigger than you have to: making it too big will not only make the tracker go much more slowly, but can also cause false positives, where it sticks to something else in the frame that looks similar. If it's too small however the tracker will lose the trackpoint. You can stop and adjust it as you go, that is often the best way.
The little cross is the actual attach point. It is the point whose movement the tracker will output to the target. It doesn't have to be inside the track box - sometimes this can be useful if you're tracking something that gets obscured.
So once you've adjusted the tracked area, the search area, and the track point if necessary, hit the track forward (or backward, it works bothe ways) button and the tracker will start its magic.
You can as I said start and stop the tracker and if it goes wonky you can go back to the last good frame, adjust it and start again. If you hold the alt key when you move the track box it will move the track box without moving the attach point, meaning that you can keep the motion of the track point stable while changing the part of the image you're tracking. This is very useful for tracks where the track point is obscured.
Weirdly enough in this shot the next zebra appears exactly where the first one was. But as you can see, the motion tracker has nicely followed the zebra's nose to the edge of frame.
Now it's time to apply this track to something. Choose the layer you want to apply the track data to by hitting Edit Target. This will bring up this dialog - as you can see you can either use the track data to move a layer, or to move a point control for an effect (of course with expressions you can also use the data for anything your heart desires, but that's beyond the scope of this answer).
Choose the layer and hit OK, then hit Apply to apply the data. You'll get asked if you want to apply the data to x and/or y, and then the tracking data will be written to the position property of the target layer.