You can search for "softbody physics", or "mass-spring systems" if you want to go into details and theories. For Unity, you can use Sprite Skin and Spring Joint to achieve the effect.Thanks for playing!