Easy: exited the port, walked through the taxi stand, and turned right on the first street. You can see the tram line running down the middle of the street.
After walking about a block from the port along the sidewalk, between the tram line and a waterfront park, we came to the Findikli tram stop. (I believe you could also turn left from the port and hit a tram stop pretty soon, but I don't know that one's name.) There is a metal stall marked "Jeton" where you buy the tokens. The Findikli stall is in the middle of the street between the tram lines, but some other tram stops have their stalls on either side of the street. Buy your token, then enter the turnstile by putting the token in the slot.
The tram is very efficient and inexpensive, 1.30 new Turkish lira (YTL) per ride. Trams heading towards the port into town are marked "Zeytinburnu". Ones from town to port are marked "Kabatas". The ship was docked just across the Golden Horn from the old part of Istanbul, and the tram runs from the port, across the Galata Bridge, and right into the old town. Celebrity offered shuttle buses to the Grand Bazaar for $10 per person each way, but the tram was cheaper, ran more often, and took us closer to the historical sites.
We didnt dare brave the tram and took a taxi. We asked the price first and it was OK but we haggled and got it down a bit. We asked him to drop us at the souk which we loved and then strolled some of the way back before stopping at a rank to pick up another taxi to take us back to the ship. Funnily enough suddenly it was more expensive to return but they came up with all sorts of reasons, such as the route was more difficult,the price is more in the early evening!!HHMMM I think we were had. One note of caution a fellow cruiser who has travelled extensively and is no fool was scammed by a driver who took some dollars off him and then switched them as they haggled the price and suddenly had lesser value notes in his hand, he then became very aggresive when our friends protested and some of the drivers friends backed him up and made this couple feel intimidated. They were so keen to get back to the ship they paid the extra! I think I would have walked away. Dont let this put you off though there are good and bad people wherever you go. Enjoy your trip, Regards C Guy.
TIP - The trouble is with these countries the taxi drivers may or may not be regulated. In situations like that in any country ( even the UK ) I find it works wonders when you mention the word "POLICE" which is understood in most languages. Taxi drivers hate this because they know the authorities don't want to upset the cruise trade and have strict rules which the drivers do know about. Try to stop a policeman enroute or around you. Taxi drivers will not screw you then.