DD is a code that was used in WWII for a destroyer. I forget the ones given to carriers, submarines, cruisers, etc.
CV, SS, and CA, as a general rule. I may as well make a list of the most common from WWII-era:
BB - Battleship
BC - Battle Cruiser
CV - Aircraft Carrier
CVE - Escort Aircraft Carrier (about half the size and one third the air complement)
CVS - Aircraft Carrier designed for ASW (anti-submarine warfare) roles. (Trivia - most submarines were, and still would be, sunk by aircraft)
CA - Heavy Cruiser
CL - Light Cruiser
DD - Destroyer
DE - Destroyer/Escort
FF - Frigate
SS - Submarine
APD - High-speed transport
AO - Oiler (Almost always one around - small ships didn't have the fuel to get very far)
PT - Patrol Boat
Modern navies have a lot of 'G' designations for "Guided-Missile":
PG
FFG
DDG
CG
SSG
And also, of course, the 'N' designation for Nuclear:
CVN
SSN
SSGN (nuclear-powered submarine that launches guided missiles)
And finally, Ballistic-Missile launchers:
SSBN for Submarine, Ballistic-missile, Nuclear-powered
In theory, for futuristic or alternative-reality games, you can mix-and-match:
DDN (nuclear-powered destroyer)
FFBN (nuclear-powered Frigates that carry ballistic-missiles (yes, that would be a little absurd))
AON (nuclear-powered oiler)
CVGN (nuclear-powered aircraft carrier with guided missile launchers)