Focus is about getting a sharply defined image. It's dependent on having a decent optical system, and adjusting the lens to suit the distance between the object being photographed and the focal plane, or photographic target (the film in the camera, or electronic target for digital or video cameras), where the image lands inside the camera. The focus adjustment will need altering when that distance changes, whether that's because the camera, or the object being filmed, moved.
Some cameras have no way of focusing an image. There's pinhole cameras which have no lens, and rely on on having a neat hole of the right size. And there's fixed-focus camera which have a non-adjustable lens, one that's built to work with everything remaining in focus across a certain range of distances (they usually have a very wide depth of field) Fixed-focus lens are probably more useful than auto-focus lens for amateur photographers wanting to take snapshots, there's no adjustments to go wrong.
There's several ways that you can focus a camera:
By measuring, or estimating, the distance the object is from the camera, and setting the lens to same figure. This depends on the lens being well calibrated, accurate measuring, and you having enough depth of field to compensate for any errors.
By eye, on a camera that lets you see through the lens. You just adjust the lens until things look right.
My Chinon CE-4 35 mm camera combines several focussing aids: There's a centre split-circle focussing aid—that flue-pipe will not be split apart when the focus is right. The prism around it shows an exaggerated blurry image until you focus the lens correctly—that flue-pipe will be clearly defined, then. And the rest of the viewfinder has a ground-glass type of surface which shows the image as it will be photographed.
Using a camera with an automatic focus feature, although this can be fraught with problems. The classic problem is demonstrated in the picture below: There's something between the camera (the fence) and the objects to be photographed (the chickens), and the camera has focussed on the wrong thing (the fence is sharply in focus, and the chickens are blurry). The same sort of thing can happen if the camera focusses on the centre of the frame, yet what you wanted to photograph was away from the centre.
This refers to the range of things, at different distances from the camera, that will remain in focus. It's determined by the lens (it's focal length, and the aperture). A very narrow depth of field means that only objects at a certain distance from the lens will be in focus, and a wide depth of field means that other objects closer and further away will also be in focus.
Deliberately adjusting your depth of field, by zooming, changing lenses, or the aperture (and then adjusting the exposure time, to compensate) can be used for special effect. You might want the foreground to be sharply defined, yet everything else behind them to be softly defined. This draws the viewers attention solely to the object that you desire. Or the opposite, where you might want everything to be sharply in focus. And all the possibilities in between, such as getting everyone grouped around a table to be in focus, yet the background behind them out of focus. When playing with the exposure time, you have to take into account what you're photographing, a very long exposure time isn't going to work if you're photographing people who aren't motionless.
The different wavelengths of light (different colours) will pass through a lens differently. Hence blue light will focus at a different distance than red light. Lenses are generally designed to minimise that problem, though cheap, or very simple, lenses can be noticeably poor. Non-visible (to us) wavelengths of light such as infra-red and ultra-violet might be visible to the camera, and they can show a blurry image on top of the normal colour range for our eyes, as well as fogging the image (giving everything a glary washed-out glow to it). This problem won't be noticable if the camera, or film, isn't sensitive to those wavelengths. But if it is, you can use filters in front of the lens to remove the problem wavelengths (infra-red and/or ultra-violet “stop” filters).
Moving objects will blur unless the exposure time is very short. Of course, this is a trade-off with the amount of light let through the lens, at the same time. You have to balance one off against the other. You can mitigate motion-blur problems, to some extent, when you're filming moving objects, by moving the camera with the object before you press the trigger. For instance, if you were photographing a car going around a racetrack, you'd follow the car's movements with the camera, rather than have the camera in a fixed position. While you're likely to blur the background, you're more likely to get the car nice and sharp.
And, of course, accidentally shaking the camera while taking a picture will blur photos. You need a decent grip on the camera while taking a shot, and it's usually best to squeeze the trigger and hold onto it until the shutter completes all of its movements, rather than stab at it and let go.