It can happen a few ways - a starting number of people will buy it, think how great it is, and recommend it to others...i.e. Facebook or here on Yahoo. Another way that will attract people if they're in a bookstore is either the way it looks on the outside or the title...which will then cause them to want to read it - if the book's got a great beginning, then it will be bought.