The rope in your example is probably just a simple physics-joint that limits the distance of the ball to the mouse-cursor. These joints are typically called "Rope joint" or "Spring joint".
It seems like the ripples in the string are not based on an actual physics-simulation. Most likely this is a bezier-curve where the control points get further pushed away from the central axis when the ball is closer to the mouse-position.
While the accepted answer explains how to create a realistic rope within the physics-engine, it's sometimes preferable to have a much simpler solution (as outlined above). The simpler solution (with just one joint) greatly improves the stability of the simulation. Multiple connected joints that have large forces applied tend to jitter and can result in broken and erratically moving chains of joints.
Of course you can also combine both methods, by creating your rope as such:
- A chain of nodes, connected by joints
- A distancerope/spring joint from the first to the last node of the chain that ensures that you can't pull the chain further apart than a given max-distance (one of the main reasons these chains become unstable).
This will result in a more realistically moving chain (that can even react to other objects in the physics-engine) but will require more processing-power than just a spring-joint with "fake" chain-behavior.