The optics in the lenses allows you to control the depth of field, which is the distance between the closest and farthest planes where everything appears in sharp focus. This focal distance is controlled by the aperture and is inversely proportional to the amount of light that is allowed in the camera.
Focus is crucial to isolate and highlight important characters or objects. However it is often used to keep the backgrounds blurred when they are uninteresting or as a way to give a scene more depth.
In point of view shots, manipulating the focus can also be an effective way to transmit the state of mind of a character.
It is preferable to use manual focus when shooting video to avoid unwanted automatic adjustments during the shot.