The cruise ships usualy dock in Gruz. Many times cruise ships arrange for shuttle service for their guests. Otherwise there is public transportation available, with the bus station nearby. Buss number to Old Town is 1A.
Sometimes the cruise ships dock outside Old Town Dubrovnik, in that case there will be shuttle boats at your service.