Every Dota 2 team line-up can be classified by the priority ranking by which each hero is given some of the available farm (ancients, neutrals, lane creeps) on the map. These positions also relate to where these heroes get laned, and the roles they play on the team.
Summary:
Position 1 = highest farming priority, safest farm (hard carry)
Position 2 = 2nd highest farming priority (mid lane carry or mid ganker/semi-carry)
Position 3 = third-core or utility hero (solo offlane)
Position 4 = greedy support or utility hero (roamer or tri-lane pulling)
Position 5 = low-item support, "ward bitch" (lane support for position 1)
Safe vs. Offlane: Definition
The easiest definition of safelane is: the lane closest to your team's jungle, either at the top (dire) or bottom (radiant) of the map.
Up to patch 6.85, the radiant offlane was considered to be easier than the dire offlane, because you could side-pull the large camp into the lane. You used to be able to stack the Dire Ancient camp from the Dire Offlane, for later farming with your offlane hero (such as Tidehunter or Beastmaster), later map changes to the Rosh pit and Dire Ancients made this impossible, and much less convenient for Dire.
In patch 6.86, significant map changes were made, moving neutral camps around and changing pull timings, such that dire and radiant offlanes are a bit more balanced (hopefully).
Lane Setups and Positions
The most typical team-based lane setup is A, or sometimes B.
The most typical pub setup is C, but is becoming more common in pro play.
Pro teams have also run D and E ... but it's not very common, and is done in specific circumstances.
A) Safe Tri-Lane, solo mid, solo offlane (1-1-3)
Position 1, 4, and 5 in safelane. Position 4 may be jungling.
Position 2 in mid
Position 3 solo offlane (usually against enemy tri-lane)
B) Aggro Tri-Lane, solo mid, solo safelane (3-1-1)
Position 1, 4, and 5 in offlane, against enemy safelane tri or dual lane.
Position 2 in mid
Position 3 in safelane, solo against enemy solo offlaner.
C) Dual Offlane, solo Mid, Dual Safe (2-1-2)
Position 1 & 5 in safelane (against enemy solo offlane or dual lane)
Position 2 in mid
Position 3 and 4 in offlane* (against enemy safe tri-lane or dual lane)
*Pro teams may run Doom + Lich in this setup, in the offlane, or some very aggressive laners, such as Tusk + Undying or Spiritbreaker + Bane.
D) Dual mid, Dual Safelane, solo offlane (1-2-2)
Position 1 & 5 in safelane
Position 2 & 4 in mid lane (e.g. Tiny + Io)
Position 3 in offlane
E) Dual Offlane, Dual Mid, Solo Safe (2-2-1)
Positions 3 and 5 in offlane
Positions 2 & 4 in mid lane
Position 1 in safe lane (solo)