The biomechanics of swimming boil down to two major concepts:
Streamlining: optimization of form for reduction of drag.
Displacement: ability to move water so that it will function as reaction mass for propulsion.
Drag: the resistance to movement of a body through a fluid, occurs in two varieties:
The relationship of form and frictional drag is represented by the Reynolds Number.

Easy to calculate, but where, exactly, are form and friction drag represented?

Since density & viscosity are essentially constant within an environment, they essentially cancel out, leaving:

Ultimately, the Reynolds number addresses the behavior of the boundary layer that surrounds an object moving through a viscous fluid. That layer is influenced by the viscosity of the fluid and the speed of the object.
Consider the familiar example of raindrops on a moving car:

Of course, the faster the car goes, the thinner the boundary layer gets and the more things poke out of it. When they do, they cause frictional drag in the surrounding medium. SO... objects operating at higher Reynolds numbers inherently experience more frictional drag than objects at lower Reynolds numbers.
As a first order approximation, the Reynolds number in water is a function of velocity and length. So.....
Large or speedy swimmers operating at higher Reynolds numbers (greater than 10,000) have a greater need for streamlining than smaller or slower ones operating at lower values (less than 100). E.G.:
Water displacement: But how do we accelerate an animal to the point that we need to think about Reynolds numbers in the first place? By water displacement. All swimmers use displaced water as a reaction mass to move their bodies forward (Newton's third law of motion.) This happens in three general ways:
Recoil locomotion
Familiar examples include:
High speed water jets provide momentum according to the equation:
We noticed a difference in the jellyfish and Nautilus's performance. Why?
Velocity is proportional to the reciprocal of the cross-sectional area of the nozzle. Thus the Nautilus with its low-area nozzle, accelerates excurrent water to a greater velocity than the jelly.
As stated previously, the big disadvantage of recoil locomotion is that if the creature is already moving, the reaction mass must be carried along inside the cavity (i.e. accelerated forward) for some interval before being expelled backwards.
Appendicular locomotion
Appendages are used to displace water. This takes two general forms:

Examples:
Typically, rowing appendages emphasize area over shape, and are not distinctly tapered. The limb excursion involves a distinct power stroke where the maximum profile is presented to the water, and recovery stroke, where that profile is minimized by the folding or feathering of the limb.

An interesting side effect, in aircraft design, is the tendency of vortices to form at wingtips, as air rushes from below into the low-pressure region above the wing. This renders the area near the wingtip useless for lift generation. Aircraft designers have developed wingtip winglets as a means of preventing these vortices. Subaqueous fliers typically approach the problem with swimming appendages that taper to a narrow point.
Examples:
In principle, lift can be generated on either the up or downstroke of the appendage, however in life many organisms emphasize or completely rely on the downstroke. Thus, there is a continuum from symmetrical to highly asymmetrical subaqueous flight.

NOTE: Lift only becomes effective at higher Reynolds numbers, so slower/smaller swimmers favor rowing. We call it "flight" because actual flying animals operate at much higher Reynolds numbers.
Axial locomotion
Many creatures, especially chordates, use the sides of their torso to displace water during axial undulations in which the body is thrown into a series of S-curves that propagate rearward. If living primitive chordates like Branchiostoma, hagfish, and lampreys are any guide, the ancestral chordate's body was probably long and sinuous, and most of it was used in propulsion. From this ancestral state, axial locomotion has been variously derived in vertebrates.
Two major trends are apparent:

The ancestral craniate shape. Lond and sinuous with most of the torso contributing to propulsion. The elongate shape increases the Reynolds number at which the creature operates, while the high SA/V ratio increases frictional drag. Thus, angilliform swimmers typically operate at lower speeds. Example: hagfish


In thunniform swimmers, water displacement is achieved by lift, generated by the caudal fin, rather than drag. The caudal fin has a high aspect ratio (span of fin/chord). Because lift is more efficient at higher speeds and Reynolds numbers, the thunniform morph is optimized for high absolute speed. The body must be highly streamlined. Indeed, even the caudal peduncle, the source of drag displacement in slower swimmers, is streamlined to reduce drag in its side-to-side motion. The strong selection for streamlining results in a typical maximum fineness ratio (diameter/length) of .25 at about 1/3 of the body's length. Example tuna.
Interestingly, this trend is often seen in amniotes that reinvade the oceans, E.G.: Ichthyosaurs
Naturally a creature can combine these modes of propulsion. E.g.
The biomechanical constraints of swimming give us robust criteria for rejecting hypotheses of ancient creatures' life habits. E.G.: