The example you have highlighted is intended to illustrate how you can take advantage of the stash caching system to create multiple cached versions of the same template code based on with different embed variable values. From the same documentation page that you clipped your example:
They can be nested, but unlike standard ExpressionEngine embeds you
can use pre-parsing to assemble a single compiled cache of the
rendered templates - which gives you all the benefits of encapsulation
without the overhead
The idea behind this is that retrieving / inserting these cached embeds later / elsewhere in your template system as required will result in more rapid / less processor intense construction of the page, and so a more responsive site.
The names used (my_var1, my_var2) are generic values intended to illustrate the point, the names themselves have no specific meaning in this context.
The 'file_name' variable refers to the location of the template you want to use relative to the origin of your stash-templates directory - with the ':' symbol substituting for the '/' character.
The stash:my_var value refers to a value you want to pass to the embedded template - it is this difference that makes one cached version of the embed different from the other. Presumably you could have many variables listed if you prefer.
The documentation does not make clear how you would retrieve the stashed embed, but a good place to start would be using the standard syntax - i.e. {stash:embed name="my_var1"}
- the documentation implying that the second time you call this the cached version will be retrieved.
HTH