http://fedora.redhat.com/docs/yum/
Yum installs, updates, removes, etc. packages from the repositories that it's set to use. When it does something like installing or removing, it checks to make sure all dependencies are satisfied, and if not it will look for packages in the repositories to add or remove in order to satisfy those dependencies. The dependency information itself is stored in the headers of each package. It won't be able to handle dependencies that are not in the repositories.