Contrary to what several folks have said, garlic is not crushed primarily to help peel the skin.
For example, garlic can be peeled easily with the clove intact, by cutting the small hard circular bottom of the clove (the part that's attached to the base, opposite to the pointy end).
This will help loosen the skin, which should then come off very easily or will separate if you gently slide the blade of your knife in and loosen it.
While it certainly is true that crushing helps separate the skin, making it easier to peel (perhaps some folks might do it for that reason at home)
, that isn't the reason why professional cooks do it or the reason why recipes suggest it.
Why crush garlic?
Garlic is primarily crushed to release its oils, which in turn infuses subtly different flavours to the dish than if you didn't crush.
Joe's comment above explains the chemical reaction: ...
within the garlic cells are alliin and alliinase, which when combined, form allicin, which is the 'strong' flavor ...
You might also find this article from the Washington Post, where the author talks about the art of cooking with crushed garlic in Italian restaurants, a really good read.
Specifically, the author addresses some of these key points which are very relevant here.
1.
Crushed vs. Minced
From basic physics, something that is broken up into several tiny bits has a much larger total surface area than the whole intact piece.
Since the oils extrude from the cut surface, it stands to reason that minced garlic will release them sooner and readily, often leading to a more pungent taste than desired.
In addition, minced garlic can be quite temperamental and you might often end up over cooking/burning.
As the author notes: In its customary minced or chopped form, garlic can impart a pungent flavor that is difficult to harness.
Add it too early to a sauté or stew and garlic burns and becomes acrid.
Add it in the latter stages of cooking and the garlic steams or boils, leaving it raw-tasting and unpleasant.
On the other hand, slightly crushed garlic is more versatile and heat tolerant.
Left whole and partially smashed (just enough to release its powerful oils), garlic adapts to a range of high-heat techniques, cooking steadily and lending a mellow richness to a dish.
2.
Usage in dishes Crushed garlic is pretty standard in several Italian dishes.
The advantage of having one or two large crushed pieces (in addition to those mentioned above) is that you can easily remove them from the dish once you're satisfied with the aroma/taste of the dish.
This can be extremely annoying to do with minced garlic.
Some of the dishes that are enhanced by using crushed garlic are: In [roasts, stews, quick meals and stir-fries], smashed garlic cloves are remarkably flexible, absorbing high heat and in turn giving off subtle but substantial flavor.
What happens when you crush?
To answer why crushing garlic works, let me quote a bit from a good answer to the very popular question on chopping onions (since we all understand onions better):
The enzymes and amino acids involved in producing the Onion Lachrymatory Factor (seriously!) are normally contained in the cells, and only become a problem when released in volume.
Using a sharper knife will avoid mangling cell walls, creating more clean separations between layers, and reducing the amount of enzymes released.
Garlic, along with onions, shallots and leeks belong to the group of plants (genus) called Allium and being very closely related, the above is more or less true.
Indeed, it makes sense that if you want large volumes of oils/enzymes, you'd do exactly the opposite of the above advice, which is to crush it and break all the cell walls!
This also aids in the mixing of the chemicals per Joe's comment above.
Note that although a large volume is "released" or ready to be released due to the crushed cell walls, they make their way to the dish slowly because of the smaller surface area.
cooking.stackexchange.com/users/None/
I smash it first to loosen up the papery skin, which makes it much easier to peel.
cooking.stackexchange.com/users/4535/baka
If the garlic is raw I find smashing to be the fastest way to "chopped", hit it with your meat tenderizer and then a few seconds with the knife
and it is ready for whatever you want to do with 'chopped' garlic.
If the garlic is roasted, then smashing it turns it to a mush that is easy to spread.
cooking.stackexchange.com/users/6279/Cos Callis
For me it's more of a texture issue.
When I want the garlic to be crunchier, I chop it.
When I really want it to melt into a dish, I smash it.
In either case, I tend to use so much garlic that there's plenty of flavor. :)
cooking.stackexchange.com/users/5953/ykombinator
There are two reasons to smash garlic.
If you are using fresh garlic, it makes peeling really simple.
Merely separate out a clove and smash it with your knife.
The skin pulls away easily.
The other reason is it does make it easier to chop.
If you going for finely chopped garlic.
Smash it, and using a chefs knife you can now easily rock back and forth of the garlic to make it fine.
cooking.stackexchange.com/users/7278/riotburn
This is probably going to repeat what many others have said but:
Garlic comes in a papery outside cover that you need to remove before cooking (unless you're going to roast it).
Otherwise you need to get the garlic free from this, which is best done by cutting off each end and slightly crushing the clove, so that you can remove the skin.
Remove the skin, lay the clove flat,put the flat of a knife on top, and smash down with your hand to spread the fibres.
It is then flat and you can chop it sideways across the clove to produce finely chopped garlic.
Garlic is a very complex ingredient, but its other ways of use are, I think, outside the scope of this question.
Its effects depend on how it is chopped/sliced/crushed, where it is added and how and how long it is cooked - pretty well a text book in inself.
cooking.stackexchange.com/users/7347/Stuart
It seems a lot of people say to smash or crush a clove of garlic before they cut it up. Why is this?  I've cut up garlic both ways, and I could see crushed being potentially a little easier to handle since it's flatter and doesn't roll as much.
Why do people smash garlic?
cooking.stackexchange.com
<garlic>
cooking.stackexchange.com/questions/17686
cooking.stackexchange.com/users/2715/Benny Jobigan
Crushing garlic releases the oils, makes it easier to peel and chop and provides a different texture than chopping alone. Crushing garlic makes it easier to peel and to chop. 
Crushed garlic releases the oils. Crushing makes it easier to peel. It makes it easier to chop. It depends on the texture that you want in your cooking.