I would start with CSG if you are new to these ideas:
https://en.wikipedia.org/wiki/Constructive_solid_geometry