Blockade
History: Although primitive naval blockades had been in use for millennia, the first successful attempts at establishing a full naval blockade were made by the British Royal Navy during the Seven Years' War (1754–1763) against France. Following the British naval victory at Quiberon Bay, which ended any immediate threat of a major invasion of Britain, Britain established a close blockade on the French coast. This starved French ports of commerce, weakening France's economy. Admiral Edward Hawke took command of the blockading fleet off Brest and extended the blockade to cover the entire French Atlantic coast from Dunkirk to Bordeaux, and also to Marseilles on France's Mediterranean coast.
The strategic importance of blockade was shown during the French Revolutionary Wars and Napoleonic Wars, when the Royal Navy successfully blockaded France, leading to major economic disruptions. The Union blockade of southern ports was a major factor in the American Civil War. During World War I, the Allies blockaded the Central Powers, depriving them of food and other strategic materials. Germany's attempted U-boat blockade caused some shortages in Britain, but ultimately failed. This outcome was repeated in World War II.
Naval strategic thinkers, such as Sir Julian Corbett and Alfred Thayer Mahan, wrote that naval conflicts were won primarily by decisive battles, but also by blockade.

Types of blockade: 

Close, distant, and loose blockades: A close blockade entails placing warships within sight of the blockaded coast or port, to ensure the immediate interception of any ship entering or leaving. It is both the most effective and the most difficult form of blockade to implement. Difficulties arise because the blockading ships must remain continuously at sea, exposed to storms and hardship, usually far from any support, and vulnerable to sudden attack from the blockaded side, whose ships may stay safe in harbor until they choose to come out.
In a distant blockade, the blockaders stay well away from the blockaded coast and try to intercept any ships going in or out. This may require more ships on station, but they can usually operate closer to their bases, and are at much less risk from enemy raids. This was almost impossible prior to the 16th century due to the nature of the ships used.
A loose blockade is a close blockade where the blockading ships are withdrawn out of sight from the coast (behind the horizon) but no farther. The object of loose blockade is to lure the enemy into venturing out but to stay close enough to strike.
British admiral Horatio Nelson applied a loose blockade at Cádiz in 1805. The Franco-Spanish fleet under Pierre-Charles Villeneuve then came out, resulting in the Battle of Trafalgar.

Pacific blockade: Until 1827, blockades, as part of economic warfare, were always a part of a war. This changed when France, Russia and Britain came to the aid of the Greek rebels against Turkey. They blockaded the Turkish-occupied coast, which led to the battle of Navarino. War was never declared, however, so it is considered the first pacific — i.e. peaceful — blockade. The first truly pacific blockade, involving no shooting at all, was the British blockade of the Republic of New Granada in 1837, established to compel New Granada to release an imprisoned British consul.

Legal status: Since 1945, the United Nations Security Council determines the legal status of blockades and by article 42 of the UN Charter, the council can also apply blockades. The UN Charter allows for the right of self-defense but requires that this must be immediately reported to the Security Council to ensure the maintenance of international peace.
According to the not ratified document San Remo Manual on International Law Applicable to Armed Conflicts at Sea, 12 June 1994, a blockade is a legal method of warfare at sea but is governed by rules. The manual describes what can never be contraband. The blockading nation is free to select anything else as contraband in a list, which it must publish.
The blockading nation typically establishes a blockaded area of water, but any ship can be inspected as soon as it is established that it is attempting to break the blockade. This inspection can occur inside the blockaded area or in international waters, but never inside the territorial waters of a neutral nation. A neutral ship must obey a request to stop for inspection from the blockading nation. If the situation so demands, the blockading nation can request that the ship divert to a known place or harbour for inspection. If the ship does not stop, then the ship is subject to capture. If people aboard the ship resist capture, they can be lawfully attacked.

Act of war: Whether or not a blockade was seen as lawful depended on the laws of the nations whose trade was influenced by the blockade. The Brazilian blockade of Río de la Plata in 1826 during the Cisplatine War, for instance, was considered lawful according to British law but unlawful according to French and American law. The latter two countries announced they would actively defend their ships against Brazilian blockaders, while Britain was forced to steer for a peaceful solution between Brazil and Argentina.

Blockade planning: Blockades depend on four general factors

The value of the item being blockaded must warrant the need to blockade. For example, during the 1962 Cuban Missile Crisis, the items to be blockaded (or "quarantined" to use the more neutral term selected by President John F. Kennedy) were Medium-range ballistic missiles, capable of delivering nuclear weaponry, bound for Cuba. Their value was high, as a military threat against the United States.
The strength of the blockading force must be equal to or greater in strength than the opposition. The blockade is only successful if the 'thing' in question is prevented from reaching its receiver. For example, the overwhelming power of the Royal Navy allowed a successful blockade of Germany during and after World War I.
Geography.  Knowing the routes of the enemy will help the blockader choose where to blockade: for example, a high mountain pass or a strait is a natural choke point and a candidate for fortification.
A blockade tends to be a long campaign requiring a long-term commitment by the blockading power. The Atlantic U-boat campaign of World War I and Battle of the Atlantic were essentially about German blockades, and lasted nearly as long as their respective wars.  The Imperial Japanese Navy, however, made only sporadic efforts at blockade during the Pacific war, preferring to seek victory by fleet action.

Blockade running: Blockade running is the practice of delivering cargo (food, for example) to a blockaded area. It has mainly been done by ships (called blockade runners) across ports under naval blockade. Blockade runners were typically the fastest ships available and often lightly armed and armored. It is now also been done by aircraft, forming airbridges, such as over the Berlin Blockade after World War II.

See also: Blockade of the Gaza Strip
Blockade of Nagorno-Karabakh
Command of the sea
List of blockades
Maritime Exclusion Zone
No-fly zone
Sea lines of communication

References: 
Chisholm, Hugh, ed. (1911). "Blockade" . Encyclopædia Britannica (11th ed.). Cambridge University Press.