Search for my definition of depth of field elsewhere on this list for a more detailed explanation of DOF.
The way you get more things in focus (near to far) at once is by closing your iris (aperture) -- smaller openings are larger numbers and let in less light.
The way you follow a moving subject takes practice and planning. Some cameras have a built in feature to pan the focus between two points in a specified amount of time. If you don't have such a feature, or you can't use it in your situation, you just need to get good at adjusting your focus on the fly, or, prefocus, have the subject move a little, refocus and have the move again. Then shoot one or more additional angles so you can edit the movement into a smooth move (cutting from one angle to another) that doesn't reveal the stops.
If you're shooting someone on a motorcycle or something, you'll just have to practice, do several takes and use the best one. Shooting with a smaller iris for more depth of field will also help a lot.
Doug