Sexual harassment is very serious. Those that do not do anything to prevent sexual harassment may find that they are developing a pattern that will turn them into a lifelong victim. This means they will not be able to stand up for themselves and can lead towards other types of abuse.
If you feel that you are being sexually harassed, the first thing you need to do is avoid contact with the person you believe is harassing you. This will prevent them from having an opportunity to harass you further. If the person does not realize they were making you uncomfortable, they will likely approach you and ask why you are avoiding him or her.
Feel free to tell them how you felt. A good way to approach this is to take responsibility for your own feelings and acknowledge that you realize the person may not have known their actions were making you feel this way. If talking (preferably in an area with other people around) does not stop the harassment or leads to other types of harassment, then you may need to contact an authority figure.
Try to be rational when you do this and again, take responsibility for your own feelings. However, do not feel that the behaviour of the person is your fault. We each have our own responsibilities to accept and you are responsible for no one person but yourself.
Make sure that you are not encouraging any type of harassing behaviour. One way to do this is to avoid topics that are not appropriate. It is easy to be carried away and joke around, but this can lead to unwanted attention in the future. If someone is deliberately trying to harass you, they are likely to try to make you believe that it was your own behaviour that encouraged them.