The science of faster swimming can be broken into the two most basic components of tempo and distance per stroke. By working on each of these separately and then collectively you can really improve your speed. This works for both pool swimming and open water events.
Tempo is simply the measurement of the number of arm strokes. The unit of measure is in seconds and the number of arm strokes is an arbitrary one. We measure with a stop watch the amount of time it takes to complete 8 (4 left and 4 right) strokes on freestyle and backstroke. On breast and fly we count for 5 strokes.
As an example, this weekend at a meet we had two girls swimming the 100 yard breaststroke. The first girl had a tempo of 5.7 on lap 1, 6.1 on lap 2, 6.6 on lap 3 and 6.6 on lap 4. Her stroke counts (which is the other component - distance per stroke) were 9,9,10 for laps 2,3,and 4. (We generally don't concern ourselves too much with lap one since it has the dive) The second girl was 8.4,8.1,8.7 and 7.4 with stroke counts of 8,8,9.
It will come as no surprise to you that the first girl swam 1:09.0 and the second girl was 1:14.8. The key difference was the tempo. For the first girl to swim faster she needs to get her stroke count down to 8,8, and 8 while keeping her tempo up. The second girl's tempo is too slow and she needs to reduce her number of strokes as well (improving her distance per stroke).
By comparison, the woman who won the gold in Beijing had a tempo of 5.1!
So, play around with your tempo - your own personal rpm (revolutions per minute - or in this case, per second). You could swim a 75 having three different tempos. That is a good drill to increase your awareness. Then you can do laps counting your strokes trying to reduce the number of total strokes you take - thereby increasing your distance per stroke.
You will find that as you master the concept you will swim faster and more efficiently. In the swimming world, just as in the running world, there are jack rabbits and plodders. The fastest folks (and by this we mean in the absolute sense as well as the relative sense) are the ones who have fast tempos combined with excellent distance per stroke.
So, have some fun with this and let us know how it goes!