A short sale is when your lender agrees to accept less than the full mortgage balance to release the lien. Foreclosure is when the lender takes the property back through the courts after you default.
Short sales generally have less impact on your credit and give you more control over the timeline. Foreclosure stays on your credit longer and is fully driven by the lender and courts.
Either way, lender approval is required for a short sale and the process takes time. Acting early gives you the best chance to choose a path rather than have one forced on you.