1) What is the difference between what I did
Even though you set the data type to Layer, this will not create the Layer object. In order to call any methods for a layer, you will first need to create the object. Also, when you use arcpy.GetParameterAsText, the first parameter is always 0 instead of 1.
2) for df = mapping.ListDataFrames(mxd)[0], what does the [0] indicate?
The arcpy.mapping.ListDataFrames function returns a list. The [0] indicates to use the first value in the list. Even if you only have one data frame in your MXD, you will still need to indicate the index value for the list object.
3) why del mxd?
This will release any locks on the MXD.