In a crowded anchorage, you may want to limit your swing. One way to do this is to take a stern line to shore. Make sure that other boats around you are doing the same thing or you will have other vessels swinging into you.
Usually the vessel is anchored and then a crew member takes the dinghy to shore carrying the end of a stern line. The line is secured around a tree or large rock. In some of the Marine Parks, eye bolts have been secured in the rocky shoreline and are often marked with a blaze of paint or red survey tape. In this case, the preferred method is to run the line from the vessel, through the eye bolt and back to the vessel. In the morning it is just a matter of releasing one end of the line from the vessel and pulling the line back.
An easy way to store the line is to use a garden hose reel. A former owner of one of the charter vessels gave me this tip. He bought a plastic hose reel, removed all the hose fittings and then took the reel to a local chandler and had it filled with a polypropylene line.
The challenge is estimating your distance from shore so you have the correct scope. Often with students, we would end up with more scope that required. We would set the anchor and when the student had taken the stern line to shore, they would come to the end of the line before they returned to the vessel. It was then a matter of letting out more anchor rode until the stern line could be brought back to the vessel.