As a general rule, they don't. Which is what is wrong with Internet search today.
Most of today's search engines don't give a hoot about semantics. They care about keywords. I argue that they are actually helping to dis-educate our youth - who are being taught to talk in "keywords" instead of complete sentences.
Now, we may not be talking about the same thing: I really have to object to the incorrect usage of "semantics" to describe HTML markup that classifies content according to usage. This is NOT "semantics". Semantics is the study of meaning. HTML markup can't tell you the meaning of words, except in the very broadest terms, and really only peripheral to HTML markup's main job of dealing with visual presentation - e.g. "this is a list of something".
Today's web search engines generally don't know or care about the meanings of words. Some may be starting to pay attention to the meaning of HTML markup, especially as regards the "semantic web". I hate that term. I suppose the misnomer has been applied to stress the advantage of tagging, say, addresses. So, now we know that an address is an address, or a name is a name. And maybe the search engine can do something with knowing that an address is an address.
But knowing the subject and object of a sentence - let alone it's meaning? Fergetaboutit! This is where search has to go, and for some reason steadfastly refuses to do so...