To expand on what Paul said:
The server executing HFT or UHFT are almost always collocated in the exchange’s data center. This minimizes latency and also allows the algos use Flash orders (which might be banned soon) to get first look at order flow before the order is broadcast into the market. many algo’s will evaluate an order in just a few milliseconds and this is a game where milliseconds matter. Trading groups have been known to pull out all the stops including hiring kernel developers to build custom OS components to better optimize the time between when an order hits the NIC and when the resulting action is taken.
There are a couple of large buckets of strategies which are being commonly used today:
The first is trading in front of large block orders. To use Paul’s example of buying a million shares of IBM, HFT algo’s will be looking for buying pressure. A firms computers at different exchanges and dark pools will need to share information since the order will be divided up and typically executed across multiple exchanges and dark pools. An HFT algo will use statistical/machine learned models to predict the size of the buying pressure and if it determines that there is enough it will also accumulate shares from across markets and attempt to sell them for a slightly higher price.
The second is liquidity rebate trading where exchanges will pay market participants to add liquidity. (See Direct Edge Pricing) Shares that are bought or sold may only be held for a very short period of time. The goal is just to collect the rebate and break even on everything else.
In both of these strategy types the idea is to make pennies (or fractions) on a trade and do this many times per day.
As you may have noticed there are a lot of HFT jobs available and thus the trades are becoming more crowded. I see this as kind of like stat arb from the early 2000s and eventually the trade will not be very profitable since so many players are trying to make it.
As for why software is important: milliseconds matter. Latency is super important and the code needs to be tight, fast and rock solid stable. Having an algo crash and being caught with shares when the market moves against you is not very profitable. Engineering for these requirements is necessarily different and requires different skills. Crunching the full order book in real time does requires some horsepower and good algorithms. It is fun and interesting though.