yum install:

Install a programe which is in the repository. such as

yum install java-1.8.0-openjdk.x86_64

you can just type java-1.8, then hit Tab key, system will auto-fill the name for you.

yum localinstall :

If you can not find the software in the repository, only can download the .rpm file from the website of the developer. then you can use yum localinstall to install the file.

yum localinstall <path_filename>