I would like to know what are:
Harbors, as in what makes a good one, why are they important, and good sources for reading up about them, and of course, their influence and effect of military campaigns.
A harbor is any place where you can safely anchor, moor, or dock a maritime vessel. Harbors can be man-made (through the use of jetties, artificial reefs, and other similar projects) or natural (like Cape Cod, San Francisco Bay, and the Puget Sound). What all harbors have in common is they offer sheltered, relatively calm waters where vessels can be tied up safely with the reasonable expectation that the tides, waves, or the currents won't sweep them away.
Ports, as in what the heck are they, why are they important, and what makes up a port, so basically, everything that one would find in a port, what water depth/tides have on their usefullness etc...
A port is a place where shipping by water takes place. The difference between a harbor and a port is ports have the additional capacity, usually in the form of wharves, docks, warehouses, and equipment, to unload and load large quantities of cargo from ships to dry land for transport and distribution along with the means to refuel and support any vessels using the harbor for engaging in extended voyages. All ports are in harbors because the advantages offered by a harbor of safe, sheltered waters makes it much easier to do all of this. A good example of this is the difference between an anchorage in a harbor and a port. An anchorage is where you can bring your ship in to mooring and docking safely and move to and from it but the anchorage, which is nearly always in a harbor, is not equipped and usually not large enough to handle large volumes of goods.
As for good qualities for a port they need to have a good, large harbor to provide lots of space for large numbers of vessels to move in and out freely. They need lots of docks for vessels to tie up at during loading and unloading operations along with facilities like warehouses to store the goods prior to land-based distribution. They also need to be in deep enough water to accommodate the draft of any vessels frequenting the port. This is the reason why San Francisco is no longer a major port and most port operations now take place in Oakland where the water is deep enough to handle large container ships. Ports also need to be in a location where it is possible to easily distribute goods by land, usually through road or rail, although it is often true that good ports will develop such connections as was the case with San Francisco Bay in the 19th century.
Shipyards, as ports above.
Shipyards are places where you build ships. They need to be located at a harbor to provide a safe point for launching the new ships, have access to raw materials, skilled labor, and manufacturing facilities for all the parts needed to build ships, and have large amounts of space for the actual construction which takes place in large structures known as
slipways. Modern ports also need drydocks which are specialized facilities that are capable of housing a full-sized ship on dry land for repair, construction, and upgrade and moving them back into the water when the work is done. The reason you need drydocks is because water, especially salt water, is highly corrosive and there are some repairs that can't be conducted on a ship that is in the water.
Naval bases are, effectively, ports that specialize in handling military vessels. They also usually come with drydock repair facilities to handle maintenance and repair work on their own but usually don't come with all the bells and whistles you see with a shipyard. Some naval bases do double duty as shipyards, like Norfolk, but this is not common as shipyards need lots of highly specialized equipment and space to operate effectively. The main difference between a naval base and a port is the main traffic they cater to is military as opposed to commercial traffic that civilian ports enjoy and they have additional repair facilities most ports lack. The other main difference is there are often naval bases, like Diego Garcia, that are located great distances away from major nodes of traffic and function as facilities for supporting naval operations by providing space for repairs, refueling, and resupply. Naval bases in terms of placement focus more on providing strategic locations for sending out the fleet to engage, like Scapa Flow or Pearl Harbor, maintaining extended fleet operations, or controlling critical waterways and chokepoints like Gibraltar.