You can use Verlet integration to achieve this. Verlet is a set of equations used to integrate Newton’s laws of motion which allows you to simulate forces on things (gravity, wind, inertia, etc.). There are some good examples of it on the Forums. @EgoMoose shows the method in 3D on a Verlet cloth and wrote a cracking article on it here Verlet integration, and there is a superb 2D ragdoll system which does it in a GUI written by @jaipack17 here The beauty of Verlet integration.
There are some incredible minds on this forum! It is something I could never have done myself, but I have recently incorporated both the 3D and 2D methods mentioned above into my codebase.