Fins first evolved on fish as a means of locomotion. Fish fins are used to generate thrust and control the subsequent motion. Fish, and other aquatic animals such as cetaceans, actively propel and steer themselves with pectoral and tail fins. As they swim, they use other fins, such as dorsal and anal fins, to achieve stability and refine their maneuvering.
Foil shaped fins generate thrust when moved, the lift of the fin sets water or air in motion and pushes the fin in the opposite direction. Aquatic animals get significant thrust by moving fins back and forth in water. Often the tail fin is used, but some aquatic animals generate thrust from pectoral fins. Fins can also generate thrust if they are rotated in air or water. Turbines and propellers (and sometimes fans and pumps) use a number of rotating fins, also called foils, wings, arms or blades. Propellers use the fins to translate torquing force to lateral thrust, thus propelling an aircraft or ship. Turbines work in reverse, using the lift of the blades to generate torque and power from moving gases or water.
Moving fins can provide thrust
Fish get thrust moving vertical tail fins from side to side
Cetaceans get thrust moving horizontal tail fins up and down
Stingrays get thrust from large pectoral fins
Compressor fins (blades)
Cavitation damage is evident on this propeller
Drawing by Dr Tony Ayling
Finlets may influence the way a vortex develops around the tail fin.
Cavitation can be a problem with high power applications, resulting in damage to propellers or turbines, as well as noise and loss of power. Cavitation occurs when negative pressure causes bubbles (cavities) to form in a liquid, which then promptly and violently collapse. It can cause significant damage and wear. Cavitation damage can also occur to the tail fins of powerful swimming marine animals, such as dolphins and tuna. Cavitation is more likely to occur near the surface of the ocean, where the ambient water pressure is relatively low. Even if they have the power to swim faster, dolphins may have to restrict their speed because collapsing cavitation bubbles on their tail are too painful. Cavitation also slows tuna, but for a different reason. Unlike dolphins, these fish do not feel the bubbles, because they have bony fins without nerve endings. Nevertheless, they cannot swim faster because the cavitation bubbles create a vapor film around their fins that limits their speed. Lesions have been found on tuna that are consistent with cavitation damage.
Scombrid fishes (tuna, mackerel and bonito) are particularly high-performance swimmers. Along the margin at the rear of their bodies is a line of small rayless, non-retractable fins, known as finlets. There has been much speculation about the function of these finlets. Research done in 2000 and 2001 by Nauen and Lauder indicated that "the finlets have a hydrodynamic effect on local flow during steady swimming" and that "the most posterior finlet is oriented to redirect flow into the developing tail vortex, which may increase thrust produced by the tail of swimming mackerel".
Fish use multiple fins, so it is possible that a given fin can have a hydrodynamic interaction with another fin. In particular, the fins immediately upstream of the caudal (tail) fin may be proximate fins that can directly affect the flow dynamics at the caudal fin. In 2011, researchers using volumetric imaging techniques were able to generate "the first instantaneous three-dimensional views of wake structures as they are produced by freely swimming fishes". They found that "continuous tail beats resulted in the formation of a linked chain of vortex rings" and that "the dorsal and anal fin wakes are rapidly entrained by the caudal fin wake, approximately within the timeframe of a subsequent tail beat".
Fins are used by aquatic animals, such as this orca, to generate thrust and control the subsequent motion 
Once motion has been established, the motion itself can be controlled with the use of other fins. Boats control direction (yaw) with fin-like rudders, and roll with stabilizer fins and keel fins. Airplanes achieve similar results with small specialised fins that change the shape of their wings and tail fins.
In biology, fins can have an adaptive significance as sexual ornaments. During courtship, the female cichlid, Pelvicachromis taeniatus, displays a large and visually arresting purple pelvic fin. "The researchers found that males clearly preferred females with a larger pelvic fin and that pelvic fins grew in a more disproportionate way than other fins on female fish."
The bodies of reef fishes are often shaped differently from open water fishes. Open water fishes are usually built for speed, streamlined like torpedoes to minimise friction as they move through the water. Reef fish operate in the relatively confined spaces and complex underwater landscapes of coral reefs. For this manoeuvrability is more important than straight line speed, so coral reef fish have developed bodies which optimize their ability to dart and change direction. They outwit predators by dodging into fissures in the reef or playing hide and seek around coral heads. The pectoral and pelvic fins of many reef fish, such as butterflyfish, damselfish and angelfish, have evolved so they can act as brakes and allow complex maneuvers. Many reef fish, such as butterflyfish, damselfish and angelfish, have evolved bodies which are deep and laterally compressed like a pancake, and will fit into fissures in rocks. Their pelvic and pectoral fins are designed differently, so they act together with the flattened body to optimise maneuverability. Some fishes, such as puffer fish, filefish and trunkfish, rely on pectoral fins for swimming and hardly use tail fins at all.
Many reef fish have pectoral and pelvic fins optimised for flattened bodies 
Frog fish use their pectoral and pelvic fins to walk along the ocean bottom 
Flying fish use enlarged pectoral fins to glide above the surface of the water 
Evolution of fins
Aquatic animals typically use fins for locomotion (1) pectoral fins (paired), (2) pelvic fins (paired), (3) dorsal fin, (4) adipose fin, (5) anal fin, (6) caudal (tail) fin
Aristotle recognised the distinction between analogous and homologous structures, and made the following prophetic comparison:
"Birds in a way resemble fishes. For birds have their wings in the upper part of their bodies and fishes have two fins in the front part of their bodies. Birds have feet on their underpart and most fishes have a second pair of fins in their under-part and near their front fins."
There is an old theory, proposed by anatomist Karl Gegenbaur, which has been often disregarded in science textbooks, "that fins and (later) limbs evolved from the gills of an extinct vertebrate". Gaps in the fossil record had not allowed a definitive conclusion. In 2009, researchers from the University of Chicago found evidence that the "genetic architecture of gills, fins and limbs is the same", and that "the skeleton of any appendage off the body of an animal is probably patterned by the developmental genetic program that we have traced back to formation of gills in sharks". Recent studies support the idea that gill arches and paired fins are serially homologous and thus that fins may have evolved from gill tissues.
Fish are the ancestors of all mammals, reptiles, birds and amphibians. In particular, terrestrial tetrapods (four-legged animals) evolved from fish and made their first forays onto land 400 million years ago. They used paired pectoral and pelvic fins for locomotion. The pectoral fins developed into forelegs (arms in the case of humans) and the pelvic fins developed into hind legs. Much of the genetic machinery that builds a walking limb in a tetrapod is already present in the swimming fin of a fish.
Comparison between A) the swimming fin of a lobe-finned fish and B) the walking leg of a tetrapod. Bones considered to correspond with each other have the same color.
In a parallel but independent evolution, the ancient reptile Ichthyosaurus communis developed fins (or flippers) very similar to fish (or dolphins)
In 2011, researchers at Monash University in Australia used primitive but still living lungfish "to trace the evolution of pelvic fin muscles to find out how the load-bearing hind limbs of the tetrapods evolved." Further research at the University of Chicago found bottom-walking lungfishes had already evolved characteristics of the walking gaits of terrestrial tetrapods.
In a classic example of convergent evolution, the pectoral limbs of pterosaurs, birds and bats further evolved along independent paths into flying wings. Even with flying wings there are many similarities with walking legs, and core aspects of the genetic blueprint of the pectoral fin have been retained.
About 200 million years ago the first mammals appeared. A group of these mammals started returning to the sea about 52 million years ago, thus completing a circle. These are the cetaceans (whales, dolphins and porpoises). Recent DNA analysis suggests that cetaceans evolved from within the even-toed ungulates, and that they share a common ancestor with the hippopotamus. About 23 million years ago another group of bearlike land mammals started returning to the sea. These were the seals. What had become walking limbs in cetaceans and seals evolved further, independently in a reverse form of convergent evolution, back to new forms of swimming fins. The forelimbs became flippers and the hind limbs became a tail terminating in two fins, called a fluke in the case of cetaceans. Fish tails are usually vertical and move from side to side. Cetacean flukes are horizontal and move up and down, because cetacean spines bend the same way as in other mammals.
Ichthyosaurs are ancient reptiles that resembled dolphins. They first appeared about 245 million years ago and disappeared about 90 million years ago.
"This sea-going reptile with terrestrial ancestors converged so strongly on fishes that it actually evolved a dorsal fin and tail in just the right place and with just the right hydrological design. These structures are all the more remarkable because they evolved from nothing — the ancestral terrestrial reptile had no hump on its back or blade on its tail to serve as a precursor."
The use of fins for the propulsion of aquatic animals can be remarkably effective. It has been calculated that some fish can achieve a propulsive efficiency greater than 90%. Fish can accelerate and maneuver much more effectively than boats or submarine, and produce less water disturbance and noise. This has led to biomimetic studies of underwater robots which attempt to emulate the locomotion of aquatic animals. An example is the Robot Tuna built by the Institute of Field Robotics, to analyze and mathematically model thunniform motion. In 2005, the Sea Life London Aquarium displayed three robotic fish created by the computer science department at the University of Essex. The fish were designed to be autonomous, swimming around and avoiding obstacles like real fish. Their creator claimed that he was trying to combine "the speed of tuna, acceleration of a pike, and the navigating skills of an eel."
The AquaPenguin, developed by Festo of Germany, copies the streamlined shape and propulsion by front flippers of penguins. Festo also developed AquaRay,AquaJelly and AiraCuda, respectively emulating the locomotion of manta rays, jellyfish and barracuda.
In 2004, Hugh Herr at MIT prototyped a biomechatronic robotic fish with a living actuator by surgically transplanting muscles from frog legs to the robot and then making the robot swim by pulsing the muscle fibers with electricity.
Robotic fish offer some research advantages, such as the ability to examine an individual part of a fish design in isolation from the rest of the fish. However, this risks oversimplifying the biology so key aspects of the animal design are overlooked. Robotic fish also allow researchers to vary a single parameter, such as flexibility or a specific motion control. Researchers can directly measure forces, which is not easy to do in live fish. "Robotic devices also facilitate three-dimensional kinematic studies and correlated hydrodynamic analyses, as the location of the locomotor surface can be known accurately. And, individual components of a natural motion (such as outstroke vs. instroke of a flapping appendage) can be programmed separately, which is certainly difficult to achieve when working with a live animal."
^Martill D.M. (1993). "Soupy Substrates: A Medium for the Exceptional Preservation of Ichthyosaurs of the Posidonia Shale (Lower Jurassic) of Germany". Kaupia – Darmstädter Beiträge zur Naturgeschichte, 2 : 77–97.