The $_ represents the object that was passed throughthe pipeline (the '|') from the previous cmdlet.
For example
Get-VM | %{$_.Name}
The Get-VM cmdlet will get all the VMs on the vSphere servers to which you are connected.
The pipeline ('|') says to pass these VM objects, one by one to the next code.
In this that is a Foreach-Object (alias is '%') that will send the name of the VM (available in the $_ variable) to the default output.
On a Select-Object cmdlet you can select properties from the object that was passed through the pipeline or you can use what is called a 'calculated property'. Such a calculated property consists of a hash-pair, Name (N) and Expression.
Name is obviously the name you want to give to this calculated property.
Expression is the code block that needs to be executed.
For example
Get-Datastore | Select Name,@{N="CapacityGB";E={$_.CapacityMB/1KB}}
All datastore objects are passed to the Select-Object cmdlet.
The Select cmdlet will display the Name of the datastore and it will display a property called CapcityGB, which is displaying the capacity of the datastore in GB.
Note how the property CapacityMB that is present in the datastore object is converted to GB by the code in the Expression block.
The Expression part doesn't always need to do something with a property from the object that was passed.
For example
Get-VM | Select Name, @{N="Current Time";E={Get-Date}}
In this case the Select-Object cmdlet will display the Name property of the VM object that was passed to it.
And it will display the current time under the propertyname "Current Time".
This is an example of a calculated property that has nothing to with the object passed through the pipeline.
I hope this clarifies the code a bit.