Images in HTML are used with the <img> tag which embeds a foreground image into the document.
Images in CSS are used as decoration, rather than being elements like their HTML counterparts. You can modify the background-image property to embed an image into the background of something in CSS.
One is coded in HTML and one is coded in CSS to start with. Additionally, as mentioned before using the <img> tag makes the image an element of the page whereas the background-image property is purely decorative.
Dimensions are referring to how many pixels are in the image, whereas resolution is the density of those pixels.
Different image file formats have different use cases, here are some of the pros and cons for a few of them.