How to make a weight system?

Could you explain how to do it with physic simulation?