You can can see a lot of examples of this cloth in the internet.
Under the hood is used Verlet integration scheme by Thomas Jakobsen.
I faced with this cloth on the Lonely-pixel but it is not alive any more.
Take a look at Creating a tear able cloth in javascript how to implement it.
Or just see the result at github Tearable-Cloth.
I refactored almost all code. Split it into pieces/modules.
When I faced with the limitation of one thread in Browser, I implemented calculation of all points/constrains in separate thread.