A halyard is a line which is used to haul sails, flags, or spars. While halyards are used primarily on ships, they can also be attached to flag poles and other structures for specialized uses on land. Many sailing supply stores sell halyards along with accessories such as clips, and they are available in a wide range of materials for various uses. These stores also commonly keep reference guides handy to help people select the appropriate line for their uses.
On a sailing boat, it is vitally necessary to be able to move, raise, and lower sails or entire spars with a halyard or several. This is done for navigational reasons, so that the ship's rigging can be adjusted to take advantage of prevailing winds, and also for safety ones. In heavy weather, leaving sails or spars set can be very dangerous, and ships can become so top heavy that they topple over when the weather and seas are rough.
Spars such as yards and gaffs are long poles utilized in the ship's rigging. They run crosswise to the mast, acting as a point of suspension for sails. While some spars are fixed, others are movable, and it can be especially important to have movable spars on high rigging, as they add weight which can make the ship top heavy. It is possible to raise and lower entire spars, or to just manipulate sails, with the assistance of a halyard.
Historically, halyards were made from hemp and other natural materials, treated to prevent rot, and regularly inspected and maintained to confirm that they were in good working order. Today, sailors commonly use synthetics because they last longer, although some have a preference for traditional natural materials because they like the way they handle. The halyard can be attached to sails and spars in a variety of ways, and is usually lashed to a cleat on the other end so that it is easy to access.
It does take some training to learn to handle a halyard, especially when multiple halyards control the same sail or spar, or when people need to move quickly. On tall ships which are maintained for their historical value, people can often take advantage of classes in which they spend a few days, weeks, or even months at sea with experienced sailors, learning how to handle all of the aspects of operating a large sailing ship. For smaller sailing craft, learning to handle the lines is often an early lesson when people are taught to sail, and as people familiarize themselves with a small craft under supervision, they gradually acquire the skills to work on their own.