Need help with image masking

Hi there, hope you all are doing well. I am new to Figma and still figuring it out. I’m stuck at one feature, I found this amazing template on a website that I’m using for my project. I am attaching link to the editable document so that you’ll could understand this better. I would really appreciate your help. I just want to know that how to do it.