Selecting the Layer
If you Command Click on the word of the layer you will select the layer. (to group or turn into a smart object, etc).
Making a Selection by Selecting all the Pixels of a Layer
If you Command Click on the icon of the layer then you make a selection of that layer.
When you make a selection the cursor will change visually to represent the selection type:

Command-Click to make a selection

Command-Shift-Click to add to the selection

Command-Option-Click to subtract from the selection

Command-Shift-Option-Click to intersect the selection