Sorry if the title is confusing. Basically, I have two shapes like this (black glasses, white shape in the middle) on separate layers:
I want to remove the excess parts marked in red like this:
How can I do this in Photoshop?
I now realise you're working with Shapes. You can do this as follows:
Left Click the layer thumbnail of the top layer to select it.
CTRL + ALT + SHIFT +
Left Click the layer thumbnail of the bottom layer to select intersections:
Click on the top layer again and click
Add Layer Mask
Hopefully this should give the result you wanted.