I'm asexual so some of this is just from listening to my friends. Usually I just get a different feeling from different hot guys, some give me "feelings" or being a good boyfriend, others of a good cuddle, and some just look good.
For a relationship: They have to look like my "type" of person. Not too sporty, not wimpy. If I meet see them at a book store or at school then they seem more "my type". Basically they have to look like someone I would want to date (sometimes you just get a "they would be a good boyfriend" feeling that has nothing to do with looks). Usually I think something along the lines of "huh they seem like they would make a good boyfriend/ would be interesting to talk to. Shame I have no (hypothetical) balls " and move on. I don't really act on these feelings, it's just kind of like noticing a nice smell in the air or something. Sure it's nice and warm and would probably taste good, but you have no money.
For a random hot guy: Most of the time they don't seem my type or I just don't get the feeling that I would want to date them. I just enjoy looking at them, kind of like a walking painting of something. I won't actually stare, but if it wasn't considered weird I probably would. I just admire their hotness, no feelings attached.
For sex: From what I can tell it's just something along the lines of "damn, he looks like he would be good in bed". They might fantasize a bit or act on it depending on the situation. If the person is "the right type" and sexy then a less shy person would probably chat them up a bit, if the chance came up. The smell thing works here too.
It's basically just a short thought that doesn't really affect anything usually. "Hey they look good. Lucky girlfriend" and then continuing on with whatever.
I think most women are attracted to good looking men, but consider other qualities in him before beginning a relationship unlike males consider sex more as the objective when seeing an attractive female.