Here's how you do it in English.
An archer shoots an arrow at an orc behind a tree.
The arrow flies through the air.
The arrow hits the tree.
Tree takes damage.
Here's what is really happening:
"An archer shoots an arrow at a target behind a tree."
The archer's shot is detected. A unit named "Arrow" is created. Arrow is added to a group called "arrows being shot". Arrow's direction and speed are added to a hashtable under the arrow's handleid. Direction is calculated by atan2(tree's y coordinate - archer's y coordinate, tree's x coordinate - archer's x coordinate). Speed is a constant that you get to make up.
"The arrow flies through the air."
Every .0167 seconds, the group called "arrows being shot" is cycled through. Arrow is in that group. Its direction and speed are retrieved from the hashtable. Arrow's position is changed based on those two numbers. Units around arrow are cycled through. If any of those units are viable, then arrow has hit something. Position is changed by setting arrow's X and Y positions. New X position is speed*cos(direction) + current X position. New Y position is speed*sin(direction) + current x position.
"The arrow hits the tree."
During one of the .0167 second cycles, a tree is detected. Arrow is removed from the group "arrows being shot", arrow is destroyed, its hashtable values are flushed, and the damaging effect is executed.
"Tree takes damage."
A dummy unit is created, it casts a spell of whatever damaging effect the arrow will do on the tree. The dummy unit expires.