I believe that this question was asked here before however I still cant find a solution.
Laets say I have got 2 layers. Layer 1 is a square blue color and layer 2 is a green circle. Green circle is positioned so half of circle is outside that squer and half inside.
How do I cut off outside half and keep everything in each layer and color as it was?

Tried all different sorts of but nothing seems to work as should.
Thanks.