There are four strokes used in competitive swimming: the Butterfly, the Backstroke, the Breaststroke, and the Freestyle.
The Butterfly (the stroke Michael Phelps used in the race he won by 0.01 second) requires coordination between your arms and legs.
The arms start behind you, sweep around and forward, and go into the water. From there, you pull your arms behind you, and repeat. The legs perform the "dolphin kick. That is where you keep your legs together, and kick down (like a dolphin kicks its tail). The timing portion of this stroke is that you must do the dolphin kicks in between each of the arm motions.
The Backstroke is the stroke where your head does not face the direction you are heading. The arms begin at your sides. From there, one arm gets raised out of the water (thumb facing out) and goes toward the front of your body in an arc shape. About halfway through the arm movement, you rotate your hand so the pinkie finger will enter the water first. After the arm has entered the water, your arm pushes toward your feet with the hand in a "stop" shape. After one full movement of one arm, you repeat with the other arm, and so on. Your legs do the flutter kick, which is where your feet alternate kicking up and down, like the stroke everyone uses when they exercise.
The Breaststroke is one of the harder strokes because you need perfect coordination between your legs and arms. Your arms start out in front of you in a straight line (hands together). From there, you push your arms outward until they reach your chest. Then, you pull your arms inward, put your hands together, and push your arms out into the starting position. The legs are similar to how a frog swims. They start in a straight line. From there, you pull your legs up at the knees (keeping them in the water). Then, you pull your legs apart, kick down, and pull the legs together like when they started. The timing for the stroke is that your arms and legs must both be in the straight position at the EXACT same time.
The last stroke is the Freestyle. Although there is no defined stroke, almost all swimmers use the front crawl, which is the regular swimming stroke. Your arm is straight out in front of you to start. From there, you pull your arm around toward your feet. Then, you raise your arm out of the water, and move the arm back to the start position. However, the closer your arm is to the water when moving it forward (without it entering the water), the better. You repeat the motion with both arms alternating. The legs, just like the backstroke, perform the flutter kick.