This is How you root and install a custom recovery on your Samsung Galaxy S4, please check your model number before downloading the respective Recovery files.
Flashing a custom recovery lets you flash custom Roms, root your device and make modifications and install the latest software.
Read further for more info.
Use these Philz Touch recoveries on the following(for lollipop):
Download CWM Recovery for S4 GT-I9500
Download CWM for S4 GT-I9505
Use these recoveries on the following(for Kitkat):
Download Recovery (for Canadian Galaxy S4 SGH-i337M (Bell, Rogers, Telus))
Download Recovery (for Sprint Galaxy S4 SPH-L720)
Download Recovery (for T-Mobile Galaxy S4 SGH-M919)
Download Recovery (for US Cellular Galaxy S4 SCH-R970)
Please Follow the Instructions carefully! and watch the video carefully.