When a guy stares at a girl for a long period of time, it usually means he is attracted to the girl and checking her out, but he does not know what to do next. Many men are nervous to approach women and are unsure of how to introduce themselves.
Many guys maintain eye contact even after a girl notices he is staring simply because they are hoping to get the girl to approach them. They may even be trying to make an imprint of the girl in their mind so they can remember what she looks like. Some men may even take pleasure in making a girl feel uncomfortable by staring at her for too long.