When the function receives this parameter, it can use it within the function. When the function is executed, it looks for an element with an ID of "imgPreview" and updates the src (source) attribute. This is where you apply the argument that was passed. This function updates the source and therefore the picture is updated.
You can have many images on the page, each with an onclick event sending the name of the image file to the function.