A new feature that came with Leopard is the ability to create stacks of files accessible through the dock and presenting itself (by default) in a fan or grid of the icons of the contained files in your stack when clicked. Stacks can be displayed as regular folders or displayed as a special stack.
To change the icon of a stack: Of course if you display your stack as a folder, you only need to change the icon for this folder to change the stack icon.
But if you want to display the stack as a stack, you will see this.
How do you apply an icon to get that kind of thing?
Firstly, if you want to apply this kind of icon, you’ll need most of your stacks sorted by name, because the solution here is to put a file containing the icon and that will be displayed as the first icon stack.
Manual method for non-lazy people.
The easiest way is if you want to switch software, or create an empty folder in the folder of the stack with a name allowing it to always be in first position when sorting (eg, the name of an area), and to apply the desired icon via the method of Cmd+i described here.
Or take the Icon file if you have it.
Even easier with software.
Just drag the icon on to the stack you want to change the icon for. Simple and effective.