what does a keyframe do and how do you make one

A keyframe determinates each 3d position, scale, angle, skew in time point in one element, and make possible animate transformations between them.
You can create automaticaly a keyframe using the transform tool and simply moving, scaling or rotating a element in camera view, then, displace the red timeline cursor to anohter time position, and repeat the process. When you playback the action, it repeats all you are done. The creation command are (I).
When apply keyframes on a peg you can see the trajectory in camera view, and modify the path directly on it. You can use motion points (keyframe) fixed to one frame, or Control points, no fixed, that brings smoothnes to the trajectory. Control points are not visible in timeline, only on path curve.
If you are moving your camera, create a peg, indent the camera in it, and use the motion tool to make trajectories. You can obtain explanation about the item in the User Guide. Good Luck.