Once you have generated the theme, then naviagate to the root directory, you will find an index.html file in your root directory.
after that i believe it should be very straight forward, just add a simple link tag like you would add in your normal static html website.
But just be sure not to put a slash in the beginning when defining the href attribute.
so for example
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
this assumes you are placing the .ico file in the root directory, if not then,
<link rel="shortcut icon" type="image/x-icon" href="whatever_folder_name/favicon.ico">
hope this helps you :)
P.S: for assurance purposes i did google what your query was exactly, linking the source from where i got the exact details: The Link