Harassment covers a wide range of behaviors of an offensive nature. It is commonly understood as behavior that disturbs or upsets, and it is characteristically repetitive. In the legal sense, it is behavior that appears to be disturbing or threatening. Sexual harassment refers to persistent and unwanted sexual advances, typically in the workplace, where the consequences of refusing are potentially very disadvantageous to the victim.
The word is based in English since circa 1618 as a loan word from the French, which was in turn already attested in 1572 meaning torment, annoyance, bother, trouble and later as of 1609 was also referred to the condition of being exhausted, overtired .  Of the French verb harasser itself there are the first records in a Latin to French translation of 1527 of Thucydides ’ History of the war that was between the Peloponnesians and the Athenians both in the countries of the Greeks and the Romans and the neighbouring places wherein the translator writes harasser allegedly meaning harceler (to exhaust the enemy by repeated raids); and in the military chant Chanson du franc archer  of 1562, where the term is referred to a gaunt jument ( de poil fauveau, tant maigre et harassée : of fawn horsehair, so meagre and …) where it is supposed that the verb is used meaning overtired . 
A hypothesis about the origin of the verb harasser is harace / harache , which was used in the 14th century in expressions like courre à la harache (to pursue) and prendre aucun par la harache (to take somebody under constraint).  The Französisches Etymologisches Wörterbuch , a German etymological dictionary of the French language (1922–2002) compares phonetically and syntactically both harace and harache to the interjection hare and haro by alleging a pejorative and augmentative form. The latter was an exclamation indicating distress and emergency (recorded since 1180) but is also reported later in 1529 in the expression crier haro sur (to arise indignation over somebody). hare 's use is already reported in 1204 as an order to finish public activities as fairs or markets and later (1377) still as command but referred to dogs. This dictionary suggests a relation of haro / hare with the old lower franconian *hara (here) (as by bringing a dog to heel). 
While the pejorative of an exclamation and in particular of such an exclamation is theoretically possible for the first word ( harace ) and maybe phonetically plausible for harache , a semantic, syntactic and phonetic similarity of the verb harasser as used in the first popular attestation (the chant mentioned above) with the word haras should be kept in mind: Already in 1160 haras indicated a group of horses constrained together for the purpose of reproduction and in 1280 it also indicated the enclosure facility itself, where those horses are constrained.  The origin itself of harass is thought to be the old Scandinavian hârr with the Romanic suffix –as, which meant grey or dimmish horsehair . Controversial is the etymological relation to the Arabic word for horse whose roman transliteration is faras .
Although the French origin of the word harassment is beyond all question in the Oxford English Dictionary and those dictionaries basing on it, a supposed Old French verb harer should be the origin of the French verb harasser , despite the fact that this verb cannot be found in French etymologic dictionaries like that of the Centre national de ressources textuelles et lexicales or the Trésor de la langue française informatisé (see also their corresponding websites as indicated in the interlinks); since the entry further alleges a derivation from hare , like in the mentioned German etymological dictionary of the French language a possible misprint of harer = har/ass/er = harasser is plausible or cannot be excluded. In those dictionaries the relationship with harassment were an interpretation of the interjection hare as to urge/set a dog on , despite the fact that it should indicate a shout to come and not to go ( hare = hara = here ; cf. above).    The American Heritage Dictionary prudently indicates this origin only as possible.
Electronic harassment is the unproven belief of the use of electromagnetic waves to harass a victim. Psychologists have identified evidence of auditory hallucinations , delusional disorders ,  or other mental disorders in online communities supporting those who claim to be targeted. 
Landlord harassment is the willing creation, by a landlord or his agents, of conditions that are uncomfortable for one or more tenants in order to induce willing abandonment of a rental contract . Such a strategy is often sought because it avoids costly legal expenses and potential problems with eviction . This kind of activity is common in regions where rent control laws exist, but which do not allow the direct extension of rent-controlled prices from one tenancy to the subsequent tenancy, thus allowing landlords to set higher prices. Landlord harassment carries specific legal penalties in some jurisdictions , but enforcement can be very difficult or even impossible in many circumstances. However, when a crime is committed in the process and motives similar to those described above are subsequently proven in court, then those motives may be considered an aggravating factor in many jurisdictions, thus subjecting the offender(s) to a stiffer sentence .
Mobile harassment refers to the sending of any type of text message , Text , photo message , video message , or voicemail from a mobile phone that threatens, torments, or humiliates the recipient of these messages. It is a form of cyber bullying .
Harassment directs multiple repeating obscenities and derogatory comments at specific individuals focusing, for example, on the targets' race, religion, nationality, disability, or sexual orientation. This often occurs in chat rooms, through newsgroups, and by sending hate e-mail to interested parties. This may also include stealing photos of the victim and their families, doctoring these photos in offensive ways, and then posting them on social media with the aim of causing emotional distress (see cyber bullying , cyber stalking , hate crime , online predator , and stalking ).
Unfair treatment conducted by law officials, including but not limited to excessive force , profiling , threats , coercion , and racial, ethnic, religious, gender/sexual, age, or other forms of discrimination .
Power harassment is harassment or unwelcome attention of a political nature, often occurring in the environment of a workplace including hospitals, schools and universities. It includes a range of behavior from mild irritation and annoyances to serious abuses which can even involve forced activity beyond the boundaries of the job description. Power harassment is considered a form of illegal discrimination and is a form of political and psychological abuse , and bullying .
This is humiliating, intimidating or abusive behavior which is often difficult to detect, leaving no evidence other than victim reports or complaints. This characteristically lowers a person’s self-esteem or causes one torment. This can take the form of verbal comments, engineered episodes of intimidation, aggressive actions or repeated gestures. Falling into this category is workplace harassment by individuals or groups mobbing .
Community-based psychological harassment , meanwhile, is stalking by a group  against an individual using repeated distractions that the individual is sensitized to. Media reports of large numbers of coordinated groups stalking individual stalking victims, including a press interview given by an active duty police lieutenant, have described this community-based harassment as gang stalking .  
The targeting of an individual because of their race or ethnicity. The harassment may include words, deeds, and actions that are specifically designed to make the target feel degraded due to their race or ethnicity.
Verbal, psychological or physical harassment is used against targets because they choose to practice a specific religion. Religious harassment can also include forced and involuntary conversions.
Harassment that can happen anywhere but is most common in the workplace and schools. It involves unwanted and unwelcome words, deeds, actions, gestures, symbols, or behaviours of a sexual nature that make the target feel uncomfortable. Gender and sexual orientation harassment fall into this family. The main focus of groups working against sexual harassment has been the protection of women, but the protection of men from sexual harassment has been coming to light in recent years.
Workplace harassment is:
- the offensive, belittling or threatening behavior directed at an individual worker or a group of workers. 
- the odious dealing through pitiless, malevolent, hurtful or embarrassing attempts to undermine an individual worker or groups of workers.
Recently, matters of workplace harassment have gained interest among practitioners and researchers as it is becoming one of the most sensitive areas of effective workplace management. In Oriental countries, it attracted lots of attention from researchers and governments since the 1980s, because a significant source of work stress is associated with aggressive behaviors in the workplace. Third world countries are far behind oriental countries in that there are limited efforts to investigate the questions on workplace harassment. It is almost unseen and the executive leaders (managers) are almost reluctant or unconscious about it in the third world countries. Under occupational health and safety laws around the world, workplace harassment and workplace bullying are identified as being core psychosocial hazards. 
Harassment, under the laws of the United States, is defined as any repeated or continuing un-consented contact that serves no useful purpose beyond creating alarm, annoyance, or emotional distress. In 1964, the United States Congress passed Title VII of the Civil Rights Act which prohibited discrimination at work on the basis of race, color, religion, national origin and sex. This later became the legal basis for early harassment law. The practice of developing workplace guidelines prohibiting harassment was pioneered in 1969, when the U.S. Department of Defense drafted a Human Goals Charter, establishing a policy of equal respect for both sexes. In Meritor Savings Bank v. Vinson , 477 U.S. (1986): the U.S. Supreme Court recognized harassment suits against employers for promoting a sexually hostile work environment. In 2006, President George W. Bush signed a law which prohibited the transmission of annoying messages over the Internet ( aka spamming ) without disclosing the sender's true identity. 
New Jersey's Law Against Discrimination ("LAD")
The LAD prohibits employers from discriminating in any job-related action, including recruitment, interviewing, hiring, promotions, discharge, compensation and the terms, conditions and privileges of employment on the basis of any of the law's specified protected categories. These protected categories are race, creed, color, national origin, nationality, ancestry, age, sex (including pregnancy and sexual harassment), marital status, domestic partnership status, affectional or sexual orientation, atypical hereditary cellular or blood trait, genetic information, liability for military service, or mental or physical disability, including HIV/AIDS and related illnesses. The LAD prohibits intentional discrimination based on any of these characteristics. Intentional discrimination may take the form of differential treatment or statements and conduct that reflect discriminatory animus or bias.
In 1984, the Canadian Human Rights Act prohibited sexual harassment in workplaces under federal jurisdiction.