In Kotlin, Strings are immutable, meaning once you create a String, you cannot change its content. For example, when you call the replace method on a String, it does not change the original String but returns a new one with the changes. In the sample code, the variable 'text' holds "Hello". When we call text.replace('H', 'J'), it creates a new String "Jello" and stores it in 'newText'. Printing 'text' still shows "Hello", while printing 'newText' shows "Jello". This immutability ensures Strings are safe and predictable. If you want a changed String, you must assign the result to a new variable or overwrite the old one.