As for the implementation, it is extremely simple. For anyone interested just do a search for "verlet cloth".
EDIT: I'd specifically recommend this one [0]. It looks quite simpler than many on youtube but it feels more real.
[0] http://web.media.mit.edu/~bandy/cloth/