A self-propelled flexible fin is subjected to perturbed flows produced by inanimate structures or other moving organisms. An optimal flapping motion in unbounded fluids may not be optimal in perturbed flows. The goal of this paper is to review key studies that focused on the hydrodynamics of fish swimming in perturbed flows, and to reveal the mechanisms by which fish can exploit energy from the surrounding fluid by modelling a self-propelled flexible fin. A heaving motion was prescribed on the leading edge of the fin, and other posterior parts passively adapted to the surrounding fluid as a result of the fluid-flexible-body interaction. We consider three flow environments in this paper; i) near the ground, ii) behind a cylinder, and iii) in the wake of another moving fin. The self-propelled fin modeled here can generate more thrust with a smaller penalty of increased power input, leading to increased propulsive efficiency by flapping near the ground. For the same heaving motion, the self-propelled fin near the ground can swim faster than that moving far from the ground. The fins swimming in the wake of a circular cylinder can maintain the relative positions to the upstream cylinder without using any power input by adjusting their heaving frequency as the vortex shedding frequency, and by slaloming between the oncoming vortices. Two tandem self-propelled fins with an identical heaving motion form a stable configuration spontaneously, and the power input is reduced for the following fin by passing through the oncoming vortex centers. A Karman vortex street is generated in the wake of the cylinder, while a reverse Karman vortex street is formed behind a self-propelled fin. The optimal trajectories for the fins swimming in a Karman and reverse Karman vortex streets are observed in the vortex slaloming and interception modes, respectively, where the heaving motion is in-phase with the induced flow direction in the spanwise direction. The synchronization enables the fins to save the energy required in the swimming behaviors.