A site icon, sometimes called favicon, is a small graphic that appears in your browser, either on a tab, or accompanying a bookmark in the bookmark toolbar or menu. If you don’t choose one, you’ll get a default icon or a blank one.
The same icon is displayed at larger sizes in other contexts, so use a large image – 512×512 is recommended – that scales down well to 16×16 pixels. It can contain transparency, but bear in mind it’ll be displayed on both light and dark backgrounds. You can use a gif, png, or jpeg file.
Set the icon in Customize > Site Identity.
Some themes also support the use of a logo graphic to be displayed somewhere on the page, but they do different things with it, so you’ll have to experiment.