They draw for the first overall pick first, it is a set of four numbers drawn from ping pong balls 1-14. Every team has a certain list of 1000 number combinations in which they win if drawn.
Spurs won pick number one, then all fourteen balls are put back in the hopper and they do the same process for picks 2-4. The spurs number was picked twice again for the fourth overall pick but since they already had number one overall; the process is repeated until an eligible team's number is picked.
Zach Lowe did a great insider piece on what happened. The first three numbers for pick the first pick were 14, 5, 8. Houston, San Antonio and Detroit have almost all the number combinations starting with 1 ,2 so 14 being picked first meant almost all the teams still had a shot. With only 11 numbers left in the hopper for the fourth and final ball, the Wizards owned six of the final 11 possibilities (ORL owned one, Portland owned one, Pacers owned one, Spurs owned one and not clear who the last team with a chance was). The final number was 2 which the Spurs owned and the rest is history.
Don't know if the future could be any brighter with the draft picks and cap space this team has. Go Spurs Go