An explanation of high frequency trading

I know, in very basic terms, how the stock market works.

But I’ve read a few threads on this board and others about something that’s been in the news quite a bit lately: High frequency training.

I’ve been a bit confused about how it works. This is what I currently believe it basically boils down to.

High Frequency Trader Bill has a bunch of shares of Stock A.
Normal Trader Bob puts in an order to buy or sell a bunch of shares of Stock A.
HFT Bill sees the order Bob has put in and, based on whether the value of Stock A will go up or down as a result of that order can immediately react and either buy lots more or cash out before Bob’s order goes through. He goes on to make lots of investments basically risk-free because of his ability to immediately react just before changes in the market.

I’m really, really confident that my understanding of HFT is completely wrong.

Can someone explain it to me in basic terms?

Nick