There will be a point in your boating experience when you or someone in your party gets a boat stuck. It's a game of odds, and eventually it happens to all. The techniques and tricks to unpinning a raft are learned through study, training, and most importantly experience.
Physically hauling the boat off the obstacle is a last resort move. Many more dangers and complications are introduced when you start swimming or throwing lines, tying off to trees and rocks, then hauling on them. You will likely block up river traffic due to ropes traversing the river. When the boat releases you have tensioned lines swinging across the river, all to be avoided if possible. Often the best option is bouncing, strategic deflating, unloading, pushing, pulling, and maneuvering.
All that said, here are a few knots and tie-offs that will be good to keep in your library, just in case. Hopefully you don't need them, or find another use in your outdoor adventures.
When tying off to land your best anchors are trees. Trees may not always be available in the canyons of many of the wild and scenic rivers, in which case find a substantial boulder or other massive object. These line techniques will holdup on any object. When using webbing tie a water knot to form a loop. Use a tree or rock to tie it around, or saddle it around a tree (easier to attach, and easier to remove).
If using a rope take several wraps around the tree, more wraps for smaller trees, be careful not to overlap the loops,then clip or tie the rope back on it's self keeping this end slack. Friction will take care of the rest.
A good land anchor will be the foundation that all activity on the river focuses back on, so choose wisely. For safety and/or pull geometry it is often desirable to use more than one anchor. In this case choose 2 that are near each-other, tie 2 anchors clip them together. If one fails you are still supported by the other. In this way you can also move the focal point to a more desirable location than just one anchor will provide.
With a solid land anchor, it's time to hook up a boat anchor. Most rafts have D-rings around the perimeter. These are great to anchor off, but they are susceptible to tearing off which is unfortunate for your boat, but also can be a safety issue, and a waste of time. Use more than 1 when tying your anchor, it will distribute the load, and provide an important redundancy. Analysis of the situation and a bit of experience will tell you which 2 or even 3 D-rings to use.
There are a few methods to secure to the boat. If you have a length of rope, and some carabiners, tie a figure 8 loop, If you have webbing, tie a water knot loop. Secure to 2 of the D-rings using the carabiners, put a twist in one of the sides and clip onto your land anchor.
If you either don't have a suitable loop, or you choose to use the working line as the boat anchor a few simple knots will create your anchor. Depicted here is a method for attaching to 2 D-rings, however you can repeat the second 2 steps to pickup a 3rd.
It starts with the alpine butterfly creating a focal loop. Ensure that you have a long length of rope behind the butterfly. Loop it through the first D-ring, up though a carabiner (clipped into the butterfly), back through another ring ad back to the focal point. With a figure 8 on a bight attach up to the focal carabiner. This example illustration shows a second carabiner, but this is not absolutely necessary.
With the boat and land anchors setup, a mechanical advantage system will aid in pulling the raft off of the obstacle. The Z-drag is a system of pulleys, lines, and Prusiks that allow you to amplify your pull force on the raft. We will not go into any significant details other than to see what it looks like here, as a swift water rescue course is recommended beyond this point in the conversation. If you have already had this course, use the images to refresh your mental picture of the system.
The top image depicts a Simple 3:1 advantage system, the bottom is a Simple 5:1. A compound 9:1 is also possible with the same number of pulleys as the bottom but requires some fancy prusik work that we won't illustrate here.
Hopefully this was a useful intro or refresher into boat anchors and advantage system. As previously mentioned, the biggest support you can add to an emergency situation is either staying out of the way, or being dependable in your knowledge of systems. Start with knowing your knots, then move up the value curve. We have a number of guides here that will assist you in learning, but we recommend everyone take a water rescue course.