Many microorganisms propel themselves through fluids by passing either helical waves (typically prokaryotes) or planar waves (typically eukaryotes) along a filamentous flagellum. Both from a biological and an engineering perspective, it is of great interest to understand the role of the waveform shape in determining an organism's locomotive kinematics, as well as its hydrodynamic efficiency. For eukaryotic flagella, a famous sawtoothed solution due to Lighthill can be regularized when energetic costs of internal bending and axonemal sliding are included in a classical measure of hydrodynamic efficiency. We will then discuss locomotion optimization for bacterial swimming, and compare experimentally measured biological data on swimming bacteria and optimization results from accurate numerical simulations. Finally, the locomotive dynamics of bodies at intermediate Reynolds numbers will be discussed, where a number of surprising and counter-intuitive behaviors can be seen even in very simple systems. The dynamics of a flapping wing with passive pitching will be explored, which we have studied experimentally and numerically, having constructed a high-order accurate numerical scheme to solve the full Navier-Stokes equations in two-dimensions. By increasing the flapping frequency we find regions of improved performance when compared to a non-pitching wing, regions of under-performance, and a bi-stable regime where the flapping wing can move horizontally in either direction.