In Flash Boys, Lewis mostly focuses on the story of Brad Katsuyama, starting from a trader and ending with the establishment of a new stock exchange, IEX, which supposedly removes the ability of HFT to profit from investors. As he tells it, when investors submit a stock order, it is typically sent out to the various different exchanges for execution. The first exchange that receives the order may execute it at the current price. However, HFTs, which have small outstanding orders on virtually every stock, may infer a size of the order and that it is likely to arrive at the other exchanges in short order. Since these HFTs can get to the other exchanges more quickly than the order can, they may be able to purchase the stock on the other exchanges at the current price and then sell it to the incoming order for slightly more (e.g., pennies or fractions of pennies) than the current price. By doing this over as many stocks as possible, as many times as possible, HFT can extract millions of dollars from trades.
This is the third Lewis book I've read (the other two being Liar's Poker and The Big Short). While I've always enjoyed his stories (who doesn't like an underdog story?), I have been increasingly getting the impression that they are fairly one-sided and do not represent the whole truth. If unaugmented with the other side of the story, readers can be led to dangerous conclusions (e.g., see Fox news). With all that in mind, I do have trouble seeing any serious benefit of high frequency trading to the stock market or the economy. Even if the example above isn't entirely accurate, 1) I believe that investors as a whole should be trading far less than they are and HFT is increasing trading; and 2) I find it hard to believe that entities that apparently take no risk (e.g., having streaks of years without losing any money on any day) are providing a needed market making service that doesn't amount to a tax on investors.