From James Mirtle of the Globe & Mail:
The lottery system is pretty complicated, but the basics are that teams can only move up a maximum of four spots and down a maximum of one spot. Only one team "wins" the lottery – everyone else moves based on the team that won
That leaves every team with a maximum of only three different spots they can pick in. (The Toronto Maple Leafs, for example, can end up with the first, fifth or sixth overall pick.)
The Leafs have a 8.1% chance of picking first overall, a 74.7% chance of drafting 5th, and 17.2% chance of this year getting even worse. Here's a fancy shmancy flow chart from @majupra that may help you visualize all of the different possibilities.
You can even try your hand at the draft lottery simulator over at the Edmonton Oilers site.