The examples at
http://en.wikipedia.org/wiki/XSLT
or
http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog
seem t
You need an external tool or library to apply an Xslt transform to Xml. How you do this depends on your programming environment, however for .Net the XslCompiledTransform is the class used to apply an Xslt transform to a piece of Xml (either a file or Xml in memory).
Alternative you can use the Microsoft command line tool xslt.exe - you will need to research for yourself how to do the same thing in other programming languages / operating systems.
One file doesn't know to "suck in data" the other file, because the files aren't what will do the processing.
Some sort of XSLT processor will do this, and the way it will be told what to work on varies so it can handle different use cases.
In the case of rendering the entire transform of an XML document when it is displayed in a browser, then processing-instruction:
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
(Really it should have been "text/xml" for the type as that's the mime-type of an XSL document, but this was in the tail-end of the browser wars and browser feature implementation was still often happening faster than the speed of common-sense).
If you are controlling the transform programatically using a library of some sort (there are objects for client-side javascript and libraries in any language you're likely to want to do this from), then you've got enough control to detail what gets transformed by what. Some interesting cases here include.
You could even have a document with a node of content and a node of transforms, pick them out and run the transform.
If you are running the same transformation on multiple XML documents, it is very often more efficient to call some sort of "PreCompile()" method or similar, which takes a hit on that call to benefit all the subsequent transforms.
You can pass in values to top-level parameters in the XSLT.
You can also make the transformation in an html page:
<script type="text/javascript">
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("some_xml.xml")
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("some_xsl.xsl")
document.write(xml.transformNode(xsl))
</script>
You can add this after the xml declaration
<?xml-stylesheet type="text/xsl" href="yourxsl.xsl"?>