Corrective jaw surgery (orthognathic surgery) is needed if the bite is not correctable with braces alone. This is typically a result of over or undergrowth of one or both of the jaws and/or some form of asymmetry. Surgery is performed to move one or both of the jaws to their ideal position. In some of these cases, orthodontics can be performed to "camouflage" the discrepancy and line up the teeth, however, the teeth will not be in an ideal position.
Hope this helps!