Contraction of "Torpedo boat destroyer"; a development of the torpedo gunboat originally designed (in the last decadeds of the 19th century) as a counter to the threat posed by small, cheap torpedo boats to the major vessels of the navies of the pre-dreadnought era should they operate in coastal waters or not far from land, which is where most important naval engagements tend to take place. At that stage the destroyer was a craft of around 300 tons displacement with a crew of 20-30, armed with a couple of light quick-firing guns of maybe 50 mm - 100 mmm (2" - 4") calibre, fast for its time, probably 20-23 knots, and maybe itself carrying a couple of torpedoes in order to be able to duplicate the role of its ostensible prey.
By the time of the First World War, destroyers had grown to the 700-800 ton mark and had definitively taken over the attacking role of the torpedo boat as well as their original defensive one. The introduction of steam turbine engines had pushed speeds up to about 30 knots; the same technology increased capital ship and cruiser speeds enough to make their predecessors an obsolete liability. Armaments were generally three or four guns of around 4" (100 mm) calibre and six torpedo tubes and the ships were ocean going, if not comfortably so; they were also used for minelaying duties.
During World War I the growing use of submarines brought destroyers a new role, or possibly restored their original one, as escorts. Fitted with hydrophones to detect submerged submarines and depth charges to attack them with, they were the main opposition for the new weapon.
Between the wars, the navies of the world pushed the envelope a bit further; new destroyers were now around the 1500-2000 ton mark, with crews of 2-300, speeds of 35 knots and up being common (the French Mogador was the fastest of the era, at 42 knots, and with gun armament that pretty much put it in in the light cruiser class). Main armament was mostly four to eight guns in the 4.7-5.1 inch (120-130 mm) range, with guns being more frequently mounted in enclosed turrets rather than behind gunshields as before, and two banks of four or five torpedo tubes were normal.
During the Second World War destroyers' role as torpedo attack vessels became sidelined, faced by the twin threats of submarines and air power. Once again they were the mainstay of antisubmarine warfare, escorting convoys and heavier warships, carrying increasingly sophisticated methods of detection (ASDIC/sonar and continually improving radar) and ASW weapons; this and the threat from the air led to many ships having banks of torpedoes and conventional guns replaced by light anti-aircraft guns, depth-charge throwers and radar installations. The main armaments and control systems of newly built vessels were normally dual purpose, serving as heavy anti-aircraft guns as well as for surface use. In the carrier war in the Pacific, they also often served in the dangerous role of radar pickets, standing a distance away from the main fleets to extend the range of radar cover for the detection of incoming aircraft.
By the end of the war there a fairly clear split had emerged, with smaller, cheaper, slower destroyer escorts and frigates being designed for the anti-submarine role, and larger, faster fleet destroyers capable of serving as anti-aircraft cover for carrier fleets. The introduction of guided missiles for surface-surface and surface-air use replaced much of the gun and torpedo armament, often leaving just a single semi-automatic quick-firing dual purpose gun; hangars and decks for anti-submarine helicopters also became commonplace. The guided-missile destroyers of today are ships of 4000 tons and upwards (ships which would once have been labelled as cruisers), carrying complements of 2-300 or so, gas-turbine powered to speeds of 40 knots or so, and are the largest front line vessels apart from aircraft carriers in many navies.