Defensive swimming conserves energy. Basically float on your back and use backstroke techniques to navigate to shore. Keep your feet on the surface and use them as shock absorbers to bounce off rocks. If you are about to go over a large drop or falls, curl into a ball so your feet don't hit the surface first and potentially become entrapped. It is important to grab breaths of air when available. If you are heading into an exploding wave, over a drop, or into a hole - grab a deep breath before getting submerged. The laid back position is perfect for holding on a throw rope as well. This article provides a lot of guidance for both defensive and aggressive swimming techniques: Swiftwater Swimming. Here is a good video on defensive swimming: Defensive Swimming.
Aggressive swimming is used to get from point a to point b as fast as possible. Perhaps there is a big drop below or you are floating towards a strainer. Flip from your back to your belly and kick it into high gear with an American crawl. Pretend you are a boat and set a ferry angle to cross fast moving current without floating downstream too far. To break an eddy fence, barrel roll over it. Another special form of aggressive swimming is when you can't avoid a strainer. Turn around and go head first towards the strainer as fast as you can. When you reach the strainer, push down on it and dive over the strainer. Here is a good video on aggressive swimming techniques. This is a video on how to swim over a strainerr. This is a good video on dealing with eddies and the barrel roll technique: Swimming into an Eddy.