First you have to download this plugin for Photoshop. Download the ICO (Windows Icon) Format one.
After downloading, go to your Photoshop plugins folder. It should be in your Program Files folder in My Computer, C Drive.
Once you've found your Photoshop folder go to Plugins > File Formats and paste the icoformat.8bi file that you've just downloaded into the File Formats folder.
Now open up Photoshop. If you already have Photoshop open, you have to close it and open it again in order for the plugin to work. So make your favicon - must be 16x16 in size. Make sure you have a transparent background. After that, save your favicon in .ICO format.

Your favicon file should be called favicon.ico. Upload it to your root directory.
Now open up your index or your header.php if you're using php includes. Paste this code at the top of your document :

