How to change the website icon (favicon.ico)?

The website icon must be in the .ico file format. The file name must be favicon.ico.

upload the image file to your website directory: /public_html/your-site.com

In addition (not necessary, but recommended), you can add the following lines to every page of your website inside section:
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

or like this:
<link rel="icon" href="http://ваш-сайт.ru/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://ваш-сайт.ru/favicon.ico" type="image/x-icon">

or even like this:
<link rel="icon" href="http://your-website.com/path_to_icon/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://your-website.com/path_to_icon/favicon.ico"