As a basic summary of what would be contained in the link above, the NHL operates a similar draft scheme as the NFL (American Football).
Teams take turns drafting "of-age" prospects based on an allotment of draft picks each team may possess.
Each team gets seven (7) picks each season. Teams can freely trade their pick(s), though, like any futures, as tangible assets for other picks, players, or other prospects.
A recent example was in 2009 when then GM of the Toronto Maple Leafs Brian Burke traded the Leafs' 2010 1st round selection, 2010 2nd round selection, and 2011 1st round selection to the Boston Bruins in exchange for the rights to Phil Kessel, whom Burke promptly signed to a $5.4M (AAV) contract.
Another example comes from the 2012 NHL Entry Draft, when GM of the NY Islanders Garth Snow offered the 4th, 34th, 65th, 103rd, 125th, 155th, and 185th selections to the Columbus Blue Jackets in exchange for the 2nd overall selection.
The GM of the Blue Jackets declined the trade offer, which hopefully helps illustrate the value of high draft picks compared to lower ones. And yes, the gap between 2nd and 4th overall can be THAT BIG.
Canadian Broadcasting Corporation's (CBC)'s sportcaster (author of the great +30 Thoughts articles) Elliotte Friedman had a great write-up on why declining that trade made sense. Check it out
here.
Draft order is set based mostly on how teams finished the preceding season. Generally, the last place team (worst overall record) gets the highest draft pick. This is the source for the fandom chant of "Tank the Season" when fans actually WANT their team to lose games in order to worsen their position in the standings, to help secure a better draft pick.
People with at least half a brain don't buy into that stock though. Fans should always cheer for their team, even in the darkest hours.
Now I did say generally, and that's because the NHL actually has implements to "discourage" teams from actually tanking, by having a "lottery system". As of this season, the rules on the lottery have changed, but it remains in essence the same.
The lottery system gives each team that MISSED THE PLAYOFFS at statistical chance to "win the lottery", allowing said team to advance in position. Prior to this year, that meant that the team was allowed to advance up to 5 ranks (i.e. from 16th to 11th, or 4th to 1st, etc.)
This was the basis for the "coveted" 1-through-5 draft position being labeled "lottery picks". Any team possessing that pick had a chance at getting 1st overall, even though they may not have been the actual worst team.
Prior to last season's draft, the Edmonton Oilers had successfully managed to be the ********* team in the NHL 3 years in-a-row (the exception being the 2012 draft, when they WON the lottery and moved from 2nd overall to 1st overall).
However, like I said, the rules have changed going forward. Now, any team that wins the lottery (only available to teams that missed the playoffs), can be awarded the 1st overall pick. This means that a team that misses the playoffs by a hair can still have a shot at getting the 1st overall pick.
This change actually makes the "anti-tanking" rule far more effective, ensuring that teams try even harder to become, and remain, competitive. Although unfortunately it will likely have little effect on the "Tank, Tank, Tank" threads that inevitably crop up the second the Leafs lose a game...
It's also the reason why you'll see a lot of people suggest that in the 2014-15 season, the Leafs try NOT to make the playoffs (a Tank season). The projected 1st overall draft pick in the 2015 NHL Entry Draft is Canadian super-elite prospect Connor McDavid, who is deemed to have elite NHL talent, and hence would be able to make any team a contender for years to come (Ã la Sidney Crosby, Alex Ovechkin, Evgeni Malkin, etc.). It will seem confusing, but rest assured that is only because a large number of people operate with significantly less intelligence than yourself, and understanding their "reasoning" can be difficult because it doesn't lend itself to "sensible", "logical" or even "realistic" conclusions.