Converting something to a string is mostly a one-way road.
You can only interchangeably use a string as a number or a string. There is no (sane) way to convert a string back to a reference in Perl.
The process of converting something to a string is called "stringification" in Perl. I'm not sure what you mean by "how does that happen" - I could explain to you how Perl constructs a string in which you use variables, or I could guess about how you wrote code that did that, but I'm not sure that any of these would give you the information you really seek.