Flirting is part of human nature and is not in and of itself sexual harassment. Men flirt and women flirt. If someone flirts with you and you respond by flirting back, it is a two-way street and not sexual harassment. If the flirting is unwanted and you do not return it in kind, most of the time it stops there. But when you have not returned it and the flirting continues, it may be sexual harassment.
As offensive as the behavior may be to you, some people do not readily pick up on the fact that by not responding you do not want more of their attention. At this point it is necessary to tell the individual directly that you do not appreciate the flirting and would like it to stop.