AHA: Alpha Hydroxy Acid
This acid comes in varying degrees - the higher the percentage, the stronger the product. It exfoliates the surface of your skin, taking off the top layers of skin cells. Sounds scary, but it's much the same as manually exfoliating (ie. using a facial scrub). However, using AHAs are better and more effective than using a scrub, because they exfoliate evenly and more gently.
BHA: Beta Hydroxy Acid
This acid also comes in varying degrees - the lower the percentage, the more suitable it is for dry skins. This exfoliates inside your pores, and cleans them out to prevent blemishes. Some also say that BHAs have made their pores smaller and gotten rid of blackheads.
NOTE: For both AHAs and BHAs, remember to wait at least 10 minutes before applying another other product, as the 2nd product may negate the acidity and thus the effect of the AHA or BHA.