The Ins and Outs of Photoshop Layer Groups
As must already be apparent, layer groups in Photoshop are groups of Photoshop layers. Groups have been in Photoshop for years, but I find that most users don't take advantage of them. Hopefully this will help to change that.
To create a new layer group, click on the file folder icon at the bottom of the layers panel. There's also an equivalent option under the Layers program menu if you prefer. The layers panel itself has a menu too that can be accessed via the icon at the far upper right corner of the panel. If you are creating groups to help organize your layers, give the group a name by right-clicking on the group entry and choosing Group Properties from the pop-up menu. As an alternative, you can give a group a name at the same time you create it by holding down the Alt key (Option key on Mac OS X) when you click on the folder icon.
As with layers, you can toggle the visibility of a layer group by clicking on the eyeball icon on the left hand side of the group entry in the layers panel. Groups also support blending modes to control how the combined results of all the layers within the group merge with whatever is underneath the group. The default blending mode for a group is called Pass Through, a mode you may not have come across before since it pertains only to groups. Essentially, this mode allows the blending of individual layers within the group to continue to function as if the group container didn't exist. That is, the modes for individual layers "pass through" the group boundary. If you switch the group blending mode to anything else, all the layers within the group combine based on their respective blending modes, but do not directly interact with layers outside the group.
Once you have a group, you can add layers to it by making sure the group itself is selected in the layers panel before you create the new layer. You can also drag existing layers into our out of a layers group the same way you would rearrange the order of ungrouped layers. Simply click on the layer and drag it around in the layers panel. You can also create groups within groups by dragging one group on top of another. The layers panel will indicate the nesting by successive levels of indention in the layers panel.
Dragging a layer to the file folder "new layer group" icon at the bottom of the layers panel will create a new group containing the layer dragged. You can similarly create a nested group by dragging an existing layer group to the same icon. Somewhat confusingly, dragging a layer group to the "new layer" icon (the one that looks like a sheet of paper) duplicates the entire group.
To the left of each group in the layers panel you'll see a triangle icon that allows you to collapse or expand the display of group contents in the panel. When the triangle icon points down (the default), the group contents is displayed. When the triangle points right, the individual layers within the group are collapsed and don't display. To toggle between these two, just click on the triangle with your mouse. In both states, the layers within the group are still there and affect the document as a whole. Collapsing a group just cleans up the layers panel a bit for when you aren't working on the layers within.
Layer groups also support layer masks in essentially the same fashion as regular layers. The only real difference is that they don't start with a mask. To add one, make sure the group is active, and then click on the "new layer mask" icon (the one that looks like an open circle inside a square) at the bottom of the layers panel. A mask on a group masks everything within the group.
There are other cool things you can do with groups too. For example, with the group selected, you can move everything within the group together with the move tool. The Transform tool will operate on an entire group too when the group is selected.
Deleting layer groups works exactly the same way ad does deleting other types of layers. Simply drag the group to the trashcan icon at the bottom of the layers panel. If you want to get rid of the group but keep everything within, right click on the group and select "Ungroup Layers" from the pop-up context menu.
As you may have already discovered, the Background layer can't be added to a layer group for the same reason you can't move it on top of any other layers. It is, after all, the background layer. If you find you really must add it to a group, first convert it to a non-background layer by double clicking on it in the layers panel. A New Layer dialog will open with a default name of "Layer 0." Click on "OK" and your new layer will exist where your background used to be. Once this has been done, you can drag it wherever you need to.
Simple documents in Photoshop may not need the power of layer groups, but when you're trying to merge multiple shots to create a panorama, stacking images to extend dynamic range or focus, or perform other complex document tasks, groups can help things better organized and easier to manage.