You first need an OS X El Capitan installation drive USB disk for booting (the manufacturing drive method is not described here in detail). This tutorial is for novice users and can be skipped by senior users.
How to install OS X El Capitan in a clean system environment (note: A clean system environment means that everything on MAC will be erased)
1. First backup good important documents, pictures, data and so on, regardless of the method.
2. Insert the USB boot disk into the Mac and reboot.
3. When you hear the startup sound, immediately press the option key until you see the boot load menu appear, and then select "Install OS X El Capitan" on the page.
4. In the OS X tool interface, select Disk Utility.
5. Select "Macintosh HD" and click the "Erase" button.
6. Select "OS X Extended (journaled)" under "Format" and click "Erase", which erases everything on the Mac and is irreversible.
7. After erasing is complete, quit Disk utility and return to OS x tool.
8. Select "Install OS X" from the menu and click Continue.
9. After agreeing to the relevant terms, click Continue.