Ballast is material that is used to provide stability to a vehicle or structure. Ballast, other than cargo, may be placed in a vehicle, often a ship or the gondola of a balloon or airship, to provide stability. A compartment within a boat, ship, submarine, or other floating structure that holds water is called a ballast tank. Water should move in and out from the ballast tank to balance the ship.  In a vessel that travels on the water, the ballast will remain below the water level, to counteract the effects of weight above the water level. The ballast may be redistributed in the vessel or disposed of altogether to change its effects on the movement of the vessel.

History
The basic concept behind the ballast tank can be seen in many forms of aquatic life, such as the blowfish or members of the argonaut group of octopus. The concept has been invented and reinvented many times by humans to serve a variety of purposes.
In the fifteenth and sixteenth century, the ballast "did not consist entirely of leakage, but of urine, vomit, and various foul food leavings that lazy sailors discharged into the ballast contrary to orders, in the belief that the pumps would take care of it." In the nineteenth century, cargo boats returning from Europe to North America would carry quarried stone as ballast, contributing to the architectural heritage of some east coast cities (for example Montreal), where this stone was used in building. 

During World War 2 ships returning from Great Britain to the United States used rubble as ballast. The ballast would be dumped in New York and used for construction projects such as FDR Drive and an outcrop colloquially named Bristol Basin since it was made from rubble from bombed-out Bristol.

Uses

Ballast takes many forms. The simplest form of ballast used in small day sailers is so-called "live ballast", or the weight of the crew. By sitting on the windward side of the hull, the heeling moment must lift the weight of the crew. On more advanced racing boats, a wire harness called a trapeze is used to allow the crew to hang completely over the side of the hull without falling out; this provides much larger amounts of righting moment due to the larger leverage of the crew's weight, but can be dangerous if the wind suddenly dies, as the sudden loss of heeling moment can dump the crew in the water. On larger modern vessels, the keel is made of or filled with a high density material, such as concrete, iron, or lead. By placing the weight as low as possible (often in a large bulb at the bottom of the keel) the maximum righting moment can be extracted from the given mass. Traditional forms of ballast carried inside the hull were stones or sand.

Sailing ballast is used in sailboats to provide moment to resist the lateral forces on the sail. Insufficiently ballasted boats will tend to tip, or heel, excessively in high winds.  Too much heel may result in the boat capsizing. If a sailing vessel should need to voyage without cargo then ballast of little or no value would be loaded to keep the vessel upright. Some or all of this ballast would then be discarded when cargo was loaded.

Ballast weight is also added to a race car to alter its performance. In most racing series, cars have a minimum allowable weight. Often, the actual weight of the car is lower, so ballast is used to bring it up to the minimum. The advantage is that the ballast can be positioned to affect the car's handling by changing its load distribution. This is near-universal in Formula 1. It is also common in other racing series that ballast may only be located in certain positions on the car. In some racing series, for example the British Touring Car Championship, ballast is used as a handicap, the leading drivers at the end of one race being given more ballast for the next race.

Ballast may also be carried aboard an aircraft. For example, in gliding it may be used to increase speed and/or adjust the aircraft's center of gravity, or in a balloon as a buoyancy compensator.

In commercial shipping 

If a cargo vessel (such as a tanker, bulk carrier or container ship) wishes to travel empty or partially empty to collect a cargo, it must travel in ballast.  This keeps the vessel in trim and keeps the propeller and rudder submerged.  Typically, being "in ballast" will mean flooding the ballast tanks with sea water.  Serious problems arise when the ballast water is discharged, as water-borne organisms may create havoc when deposited in new environments.

In railways 

 Not all types of railway tracks use ballast.

References

Sources
 

Mechanisms (engineering)
Watercraft components