Go ahead and click the Download button to start downloading the installer. Once you open the App Store, you’ll see a link on the right for the latest version of OS X (El Capitan as of this writing).
The easiest way is to download OS X from the App Store. I’ll show you both methods in case one isn’t working for you. There are two ways you can install OS X on to your external hard disk: by reinstalling OS X from the OS X Utilities repair screen or by downloading OS X from the App Store and running the installer. It should only take a minute or two for the drive to be erased and reformatted. Give your drive a name, choose OS X Extended (Journaled) for Format and GUID Partition Map for Scheme.