Most of the time, they mean the same thing, but there is a difference.
A harbor could be any body of water surrounded by land and protected from waves, where a ship could stay safely. There doesn't have to be any town or dock.
Both harbor and seaport could mean a physical harbor area, but also with a dock and businesses for loading and unloading cargo. The surrounding area would be at least a small town or a city.