When updating all packages
yum update
will update any packages that have a newer version available, and take care of dependencies.
From the manual page man yum
:
While updating packages, yum will ensure that all dependencies are satisfied.
One thing to bear in mind is that while a package may have an update available, that does not mean that a dependency of that package has been updated too - they are after all seperate packages.
When updating a specific package
From the manual: If one or more packages or package globs are specified, Yum will only update the listed packages.
This seems to imply that if foo-devel requires foo, and you specify to update only foo-devel, then yum won't update foo to a newer version (unless foo-devel specifically requires the newer version).