I'm more proficient in Swimming than I am in physics, but I am a long time swimmer and I have spent a lot of time both in and out of the pool thinking about this very topic! "The Science of Swimming" is a great book written by a sports scientist which does this topic justice should you have further questions. This is also much of the source for the following:
For your legs:
- for a front crawl swimmer the leg mostly moves at the knee. Because your leg is like a swing arm pivoting at the knee, areas of your leg further from your knee travel in a longer arc, therefore displacing a greater amount of water. Most of the propulsion is generated by the flat surface of your foot as it moves through this arc (good swimmers keep the foot parallel to the shin, reason for which will be seen below).
- The amount of forward thrust generated by your kick is proportional to the sine of the angle between your propulsive surface (i.e. foot and shin, mostly) and your direction of travel (your body should remain horizontal, i.e. parallel to direction of travel). So, your kicking imparts the most propulsion if your lower leg is at right angle to your direction of travel and moving towards horizontal with your body, and the least amount of propulsion when your lower leg is already at horizontal and moving towards either up or down (this is assuming you are several feet underwater and you knee somehow bends both ways to 90 degrees. read on).
- while swimming front crawl, your lower leg has a better arc going up than down because of how our knees bend (indeed, one only gets a good "downward" kick by moving the hip in unison). The up direction also has much less resistance as your leg travels through air, not water. Extending your leg fully through this arc, i.e. all the way up, then down, results in a big "slapping" effect on the water, which is a total waste of energy. Good swimmers keep their feet and legs mostly below / at the surface of the water to create a "churning" effect. Any additional momentum generated by moving your leg through the air does not help forward propulsion as that momentum is dispersed into the water when the angle between your lower leg and body (i.e. direction of travel) is at 0, therefore the slap does not impart forward momentum (additionally it wastes energy running into water rather than accelerating while already in water).
- an efficient front crawl kick ( or double kick) uses the hip joint to pivot the knee slightly lower into the water to allow more downward arc as you fully extend your leg. IF you didn't do this, your "down" stroke would simply return your foot parallel to direction of travel and impart no real foward momentum. On the up stroke, your hip moves upwards returning to parallel with your body while your knee also contracts going to around 20-30 degrees, depending on your style. Synchronizing hip movement greatly enhances the effectiveness of the up stroke by extending the effective swing arm length.
Marcusl: Hip synchronization might give the appearance that a double kick is two "mini" dolphin kicks that create a standing wave moving down the body. However that is not the case, which can be observed if you watch carefully the rhythm of each kick. A dolphin kick has a "one-two" stroke pattern while using legs in unison, for butterfly this is two kicks per arm stroke but one kick is small and one is larger. A front crawl kick also has a "one-two" pattern but the legs are not synchronous, the pattern is just "left up, right down" and "left down, right up". Basically the idea here is that if both legs were doing a desynchronous dolphin kick there would be 4 unique steps in one complete cycle, i.e. "left up little kick, right down little kick; left down big kick, right up big kick" or "left up big kick, right down little kick"... and etc, depending on how far apart you desynchronize both leg cycles.
Nascent oxygen: if you watch swimmers you will see that their legs move more slowly down than up. This is because the basic construction of our knee allows better up movement than down while swimming. The reason swimmers stay afloat was mentioned by azizlwl - basically, good swimming technique has your body horizontal to the surface of water. You can float on your back or stomach without moving by simply being horizontal. Good technique takes advantage of this by training the swimmer to use their arm-stroke to solely generate forward momentum, in effect reaching your arm forwards, "grabbing" a pocket of water with your flat palm and pushing it past your body, keeping the movement of your arm totally parallel to your body. Outstretching your arm with palm facing downwards and trying to "push" the water down at the beginning of your arm-stroke is a great way to through out your shoulder muscle and not travel anywhere.
A butterfly kick is much more of a whip-like motion, which as mentioned earlier produces a wave that travels down the length of your body. Sperm and flagella bacteria use this motion as well, and really good swimmers seem to have very "elastic" and symmetrical undulations.
As I mentioned before, good swimmers stay horizontal to the surface of water to maintain good bouyancy. An additional factor is that staying horizontal minimizes the cross-sectional area they expose to the direction of travel, which minimizes drag. Use your head and the beginning of your front crawl arm stroke to "break" the water like the aerospike on a missile breaks the air ahead of it, reducing drag for the body that follows.
Naturally movement through water creates a vacuume behind you that slows you down. Very interestingly, it has been found through experiments measuring resistance and thrust of swimmers that kicking assists a swimmer to travel forward more by reducing the vacuum or suction behind them than it does by producing forward thrust. The legs thrash the water making it turbid, which I suppose helps "fill in" the water behind you as you go.
Thats not to say that kicking does not propel you forward, rather, the amount by which kicking propels you forward is less than the amount by which suction slows you down if you try front crawl using only your arms.