It is cloth with tearing and verlet integration. Nothing fancy or even difficult but it is probably a nice starting point.
Video: https://www.youtube.com/watch?v=G05M_Y6NQVM
Code: https://github.com/jontelang/VerletClothTearing