The trolley is free but I have to admit that I only saw one the day that we were there and that was at a stop pretty close to the pier. If you walk to the visitor's center when you get off of the ship you can pick up a map that has the trolley stops marked on it. We just walked the day we were there.
The merchents support the free trolley. Cross the street from the pier and go on the side street where you will see the local buses(garage). There is a Trolley stop sign right there. You can get on and off as you wish. I recommend taking it all the way up to El Morro as that is uphill. From there you can walk downhill and experience many interesting and historic sites.