In the 'Modern Era' as I'm defining it, I'm including ships defined more by their role and function than their size, number of guns, or crew. Many ships had initial roles they performed for hundreds of years, but now it is the role which defines the ship and not the ship performing the role. Confusing?
Consider the term "Cruiser". Cruiser was a naval role where a ship of some size would roam around by itself and engage enemy merchants or ships. The ships would simply "cruise" until they spotted an enemy and then would either engage them, or run. The size of the ship could be anything from a Fourth Rate to First Rate ship-of-the-line. Modern cruisers are ships which were initially designed to fulfill the "cruiser" role, and thus came to be known as cruisers. However, in war time operations of WWII, the role of the ships now known as cruiser changed, but the ships still retain their name.
The easiest way I believe to explain the classification of modern era ships is to start with the largest surface ships and work downwards in role.
Battleship
The goal of the battleship was to build a huge armored ship and pack on big guns. Battleships were thickly armored from bow-to-stern, keel-to-castle. A basic definition of battle ship is a ship capable of engaging any other non-battleship vessel with a better than even odd of survival. Battleships were significantly larger than cruisers. At the start of WWII, every nation in the world considered the Battleship the apex of power and all fleets were centered around a core of Battleships.
Battleships suffered from an unusual confluence of events. As the guns grew powerful enough to propel explosive shells farther than the ship could see, something was needed to let the ships aim farther than they could see. The invention of radar seemed to fit the bill. Using radar, battleships could engange enemies with a reasonable possibility of successful hits. Unfortunately, radar also sounded the death knell of the battleship as radar multiplied the power of aircraft, shifting the balance of power to the Aircraft Carrier.
Cruiser
Coming in multiple sizes and types, cruisers are defined as being heavily armed and lightly armored. Lightly armored is a relative term, as most cruisers could engage destroyers with relative ease. Essentially, cruisers contain the firepower of a battleship without the heavy armor protection. Cruisers have the capability of working alone without support, but are often part of a larger fleet.
Destroyer
Destroyers, some navies call them frigates, came in many different types. The main role of a true destroyer is the ability to engage any other ship, though often luck is required. Against battleships and cruisers, destroyers attack with torpedoes. Aircraft and other destroyers are countered with rapid fire guns. The threat of submarines are countered by depth charges. Destroyers do not act independently, however. they always work with some other large formation of ships: either a fleet or a convoy.
Destroyers serve the role of scout and protector. They are cheap enough to be 'expendable' compared to the larger ships, but are large enough to pose a threat to anything. Destroyers are the work horse of any navy, performing whatever role is required. More destroyer exist in navies than any other type of ship, mainly because their power-to-cost ratio is better than any other ship.
Aircraft Carrier
Aircraft Carriers came into their own in WWII, and possibly by accident. Every navy in the world viewed the battleship as the pinnacle of naval power. With the destruction of the American pacific battleship fleet at Pearl Harbor, the United States was left with only carriers. Six months later 3 American Carriers and 25 support ships drove off a Japanese invasion force of 6 carriers, 7 battleships, and 56 support ships. Furthermore, no surface ships ever fired on each other during this battle. From that point onward, the Aircraft Carrier came to dominate naval strategy.
By themselves, aircraft carriers are a poor warship incapable of adequately defending itself. Their armament is defensive in nature, mostly consisting of small caliber rapid-fire guns to shoot incoming aircraft. Their offensive power comes in the aircraft they carry. Even in WWII, aircraft were capable of carrying weaponry which could sink any other naval ship and project power onto land.
Missile Ships
Many types of ships now exist with the prefix 'Missile' before their class. The main armament of these ships is self guided explosive missiles. With the power of missiles, even a single missile could disable a carrier, or potentially sink it with some luck. Missile ships still require protection from aircraft and submarine based threats, but mainly their power is focused entirely offensively in their missile.