Exactly as discussed in Sebastian Lague's video https://www.youtube.com/watch?v=PGk0rnyTa1U
It's absolutely mind-blowing that so little code can produce such a beautiful result. It's also fun to play with the parameters and see how they affect how the cloth feels.