The result is that aLocalFile will be set to a reference to the part of the component that implements the nsILocalFile interface. The two JavaScript lines above can be used to get any interface of any component. Just replace the component name with the name of the component you want to use and change the interface name. You can also use any variable names of course. The interfaces that inherit from others have their own functions and the functions of all the interfaces that they inherit from.
All interfaces inherit from another interface.
The top-level interface is called nsISupports. All interfaces are descendants of this interface. It has one function supplied to JavaScript. This is QueryInterface which we have already seen. Since the interface nsISupports is implemented by all components, the function QueryInterface function is available in every component.