The simple layman terms are:
Variables and objects are different things in Ruby. Each variable is a label that points to an object. Each method call is sent to an object. For convenience we often simplify discussion, because it is easy to say "The name is 'Sam'" when in detail we mean "The value stored in the String object pointed to by the name variable is 'Sam'"
In your first example:
The line name = "Rol" creates a new String object from the literal "Rol" and points the local variable name at it.
The line title = name points the local variable title to the same String object.
The line name = "Sam" creates a new String object from the literal "Sam" and points the local variable name at it. Now name and title point to different String objects.
At this point there are two independent String variables, with two different variables pointing at them, so any uses of them remain separate.
In your second example:
The line name = "Rol" creates a new String object from the literal "Rol" and points the local variable name at it.
The line title = name points the local variable title to the same String object.
The line name.replace("Sam") modifies the object. It doesn't matter which variable you used to access the object in the first place. title.replace("Sam") would have identical results, since it refers to the same object.