If you’re being harassed at work, the first thing you should do is tell the person who’s harassing you that you want them to stop. You should also report the harassment to a supervisor. You have to make it known to your employer that you’re being harassed and that you want it to stop.
Now, what’s harassment for some people may be simply jokes and innocent conduct for other people, and whether or not the harassment you’re experiencing is severe enough to be illegal harassment depends on the situation.
In order for harassment to be illegal generally, it has to be both subjectively and objectively offensive. Subjectively means that you yourself consider it offensive conduct, and objectively means that an ordinary person would consider that conduct to be objectionable.
If you have any questions about whether the harassment you’re experiencing is illegal, you should contact an employment lawyer.