Ok so when you download El Capitan, it appears as Install El Capitan.app in your Applications folder. Make a copy of this and store it on another driver or USB stick, the one in the Applications folder will self delete on completion of the install procedure, this saves you having to download it again should you need to.
First of all make sure there is enough free space on your HD, Macs need at least 15-20GBs on the HD drive to function properly.
Open Disk Utility from the Utilities folder in your Applications folder and run Verify on your Macintosh HD. If any errors are found then you will need to boot to your Recovery HD and run Disk Utility> Verify until all errors are cleared.
It is quite normal for the machine to restart, have you been giving it enough time before you interrupt the process.
If it still stalls then you could try installing it whilst in Safe Mode, Use safe mode to isolate issues with your Mac - Apple Support
Other things you may try before trying the installation again are, Reset NVRAM or PRAM on your Mac - Apple Support
How to reset the System Management Controller (SMC) on your Mac - Apple Support