first you have a image file with .ico format.
you create any image file png or jpg and convert to ico format online
paste this code in head teg of your website
replace yourfile.ico to your file name.
<link rel="shortcut icon" href="yourfile.ico" type="image/x-icon">
and upload your icon to website folder