Meaning: It describes an image. Suppose we are explaining an image to a person who can't see an image. What we explain to that person is what an alt attribute is. It contains that explanation string. It is used by 1) Screen readers 2) Search Engines and 3) Browsers as a fallback when images fail to load.
When screen readers are reading a page, when it comes to the <img> element, it speaks "Image, <text inside alt attribute>".
Here, one point that can be considered is that, when screen readers reading alt text, it already speaks the word "Image" or "Graphics", so we should omit alt text that starts with "image of" or "graphics of", as screen readers already speak it.
The search engine reads alt text to understand what the image is for.
Traditionally, search engines can't read images, so they read the alt text instead. However, now in the AI era, if a search engine starts using image reading, then it is another thing.
When a browser can't load the image, it shows the <img>'s alt text instead.
If you don't want 'alt' to be considered, you can pass an empty string "" to the alt attribute, for example
For instance, if you have an additional image on top of the main image that partially obscures part of the main image (such as to hide contact info), in such cases you may want the 'alt' text of the additional image not to be considered. In that case, you can pass an empty string "" to the alt attribute.