If you have downloaded the Apple Mac OS installation file from Apple Store then you cannot use these files to clean install Mac OS on your computer. This is because you do not have a bootable installation disk for doing so. Unless you have a bootable installation disk, you can use these downloaded installation files only for upgrading your system to a new version. In order to create a bootable installation disk, you can use the free DiskMaker X tool in your Mac.
DiskMaker X supports creation of bootable installation USB drives for many versions of Max OS X – Yosemite (10.10), El Capitan (10.11) and Sierra (10.12). You can launch the DiskMaker X program and pick any of the versions for which you want to create the bootable disk. It will search for the installation files that you have already downloaded from Apple Mac Store or it can ask you to download the files for you. In the latter case it can take some time as the downloaded files are many gigabytes in size.
After this, you have to select one of the USB disks attached to your computer. By default, it selects the USB pen drive attached, but you can also choose any other drive if you want. It is recommended that you use a pen drive of at least 8 GB capacity. And if you use USB 3.0 pen drive, then installation will be much faster.
When the bootable USB drive is ready, you can boot from this drive and it will lead you straight into the Mac OS X installation program. Now you can choose to format your hard drive and clean install the Mac OS X on your system. DiskMaker X can be used to not only clean install the operating system, but you can also use it for downgrading or upgrading the Mac OS X.
You can download DiskMaker X from http://diskmakerx.com/.