This is Boolean Operations on Mesh.
Use this thread to learn more about it.
Here is repository from GitHub. Which was previously used a lot, still can be used. Want to know more, use this thread.
And if you are in a hassle, here is a repo. I have used it.