Front focus is when the lens and camera focus in front of your intended focus point. Your subject will look slightly out of focus and something in front of them will be razor sharp in focus.
Back focus is correspondingly when something behind them is in focus, instead of your intended subject.
As to why.. it could be mis-aligned, mis-calibrated equipment. It could be you or it could be your subject. You or your subject could have moved slightly after focusing and this would also cause front or back focus.
In terms of why it would be this way for the equipment:
- Things may be out of spec from the factory, due to poor QA.
- Things could be in an acceptable QA range, but your combination of camera and lenses could be at opposite ends of the acceptable range.
- Your autofocus could be not properly functioning due to a software issue (this seems to be the case for the Pentax K-x camera with tungsten light sources...go figure).
There's a host of why, but most of them boil down to something being not quite calibrated, aligned, or working 'properly'.
Modern choices to fix it usually include one of three options that I'm aware of:
Send your camera and lens to the manufacturer to be 'fixed' or calibrated.
Your camera may have a global adjustment in which you can tell it to always adjust its autofocus front or backwards by a small adjustable amount.
Your camera may have a per lens adjustment in which the camera will remember that this lens always needs a certain small adjustment that you provide in order to function properly. (Usually up to some reasonable number of lenses.)
Which of these is an option, typically depends on the 'level' of camera you have. More entry levels (like my Nikon D3100) have no adjustment options. The Pentax K-x (mid level), for example, offers a global adjustment and the Pentax K-5 (mid-upper level) offer a per lens adjustment.