Vision

Vision determines how far a unit can see from its current location, your line of sight is affected by elevation and trees - The only exception to this rule are flying units who have unrestricted vision, and Night Stalker with an Aghanim's Scepter.

Fog of War
All areas outside of friendly vision becomes Fog of War, non-friendly units within the Fog of War cannot be seen or targeted (It is effectively Invisibility), however they can still be hit by non-targeted spells, to reveal these units a friendly unit must gain vision in that area.

Elevation and Trees
Units cannot see up elevated areas but units on elevated ground have increased view distance. Any ranged units firing uphill have 25% chance to miss. Trees block all vision and can be used to escape enemies (Known as "Juxing").

Day and Night
During the day units have their day vision stat has their vision range (usually a lot higher than their night value), however during the night the majority of units have vastly decreased view range. Most heroes have a basic 1800 day vision and 800 night vision.

Exceptions to this rule are:
 * Enchantress 1800/1800
 * Sniper 1800/1000
 * Night Stalker 1200/1800
 * Ancient Apparition 1800/1400
 * Drow Ranger 1800/1700

True Sight
True sight allows units the ability to see invisible units. There are several ways for a Hero to obtain true sight:
 * Gem of True Sight
 * Sentry Wards

The following buildings also have true sight:
 * Towers
 * Ancients