Harassment is the act of using units to strategically to slow down or stop either the enemies' teching, amassing of units for attack, or economy. Harassment draws inspiration on real world destruction of opposing armies' logistics and supply line. It forms core strategy hampers the development of attacking forces which allow players to research, expand, and attack with a stronger force than the other.
As harassment is meant to cripple the targets in hit-and-run type attacks and without decisively destroying them completely, the ability to retreat is critical. Units that are either very quick, ranged, and/or stealthy are especially designed to allow players to hit-and-run enemies near the outskirts of their maximum range. Hopefully, when players use harassment tactics in this fashion, they'll be able to deal massive amounts of damage without taking much in return.
The ability to infiltrate bases without detection and kill workers before a "You are under attack!" warning alerts the opponent, which means a harassment can frequently destroy a distracted opponent's economy without the opponent ever knowing what happened.