Thanks Swingley that is useful. But I think there is a very fundamental concept of all this that I have not yet grasped.
My map service has a total of 4 feature layers in it (3 polygon layers and 1 polyline layer). I already added the map service to the map (with all 4 layers of course as they are all in one mxd project which sits within the map service). I added them to the map by defining an "ArcGISDynamicMapServiceLayer" and specifying the URL of the map service.
Now I want to allow a user to interact with the interface and specify how to symbolize one specific feature layer within that map service.
The samples that show how to symbolize feature layers (under the category "Renderers") all show how you can take a single layer from an existing map service, render it in a specific way, and then add it to the map. If I was to do this then I would end up having that specific feature layer in the map twice right? That is not what I want at all. I want to access a specific layer within the map service that has already been added to the map.
Using the map.layerIds property that you suggested only gives me access to the single map service that I have in the map, not the individual feature layers that are contained within that map service.