The collision layer describes what your current object is. The collision mask is what your current object is able to collide with.
Lets say you set up two different collision layers:
Enemy (configured like @Xrayez said in the project settings)
On your player node, you would set the collision layer to
Player and the collision mask to
Enemy. On your enemy node, you would set the collision layer to
Enemy and the collision mask to
Player. This would mean that both entities will detect collisions between each other.
You could alternatively only set the collision mask for the player node to
Enemy, and not set anything on the enemy node, and I believe you would then only detect collisions via the player node.