With OS X El Capitan, Yosemite, or Mavericks, you can use a USB flash drive or other removable media as a startup disk from which to install OS X.
Here are a couple of additional notes I have found useful in using this process.
1. After launching Terminal paste the following code (REMEMBER to replace “MyVolume” with the name of the volume/drive you want to create the bootable drive on.
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Make sure there is nothing on it that you need as this process will completely wipe that drive/volume.
2. When prompted for your password, enter the password for the user. Remember that when you’re using terminal and are entering your password, you will see no indication that the password is being entered. Just enter the password very carefully and know that it is being received. You can find more information about this particular part of the process here. After you enter your password return, you will be asked to verify the volume/drive you are creating the bootable disk on. Type in Y and hit enter to continue. The process will start after that.