A stack is a Dock item that gives you fast access to a folder. When you click a Stack, files and folders within spring from the Dock in a fan or a grid.
OS X starts you off with the Downloads stack. The Downloads stack contains files you download from Safari, Mail, and Messages. You can create as many stacks as you want by dragging folders to the right side of your Dock.
You can change how a stack appears by right-clicking or control-clicking its icon in the Dock.
Choose an option from the shortcut menu that appears:
Fan stacks show a portion of your folder content and arrange the icons so that the closest icon to the Dock is based on the order of the "Sort by" option you have selected.
For example, if you select the "Sort by" option of "Date Added", the Fan stack expands showing the icons of the most recently added items closest to the Dock. This is the default setting of your Downloads folder, making it easy to open, copy, or move your latest download.
If you want to open the folder represented by a stack, click the Open in Finder button . The Finder opens the enclosing folder in a new window so that you can work with its contents.
Grid stacks show a folder's content as a matrix of icons arranged by your "Sort by" option.
Grid stacks are scrollable, and allow you to navigate folders. Click a folder in the Stack to open that folder without leaving the Stack. Click the arrow button that appears in the upper left of the Stack to go back to the folder you came from. If there are more icons than can be shown within the grid, a scroll bar appears.