I've never really understood the stock market. Is this basically how it works?

A person can make or sell things, but that person is limited in the scope of their business by their available capital. Thus, they can increase their capital by either securing a business loan or by making their company "public." Securing a business loan is risky, because they will still have to pay back the loan regardless of whether or not their company makes any money. Going public carries additional risks, but at least they aren't on the hook if the business fails - and there's an added benefit of the potential for enormous gains in capital which can further increase their business potential.

So, the person "goes public" which is extremely complex and time consuming, but let's say they are able to convince 100 people that they should each buy a "share" of the company. This means that the more money that the company earns in profit, that a little bit of that profit is "owned" by each person who owns a share. Right? (I am legitimately asking here, because as I said I really don't understand much of the way it works.)

So, now we have stock exchanges. These are places that people can buy, sell, or trade stocks of different companies for cash or other assets? I own one share of Company A and that share is worth $51 right now. Later in the day, however, we see that company A has earned a little bit more money than we thought it was going to, and so now my stock is worth $53. And I originally purchased the stock for $47, so I can potentially sell that stock for a $6 profit, or I can hang on to it and hope that it goes a little higher.

However, humans can only act so quickly, and day-traders and short-sellers act on stocks in the span of minutes or hours. So if I purchase 10,000 shares of Company B at 10:00 for $5 each, and then sell those same 10,000 shares back at 10:04 for $5.02 each, then I have made a small profit. And large firms do this hundreds of times each day, with dozens of companies, and likely tens of thousands of stocks. Right?

So, HFT does the same thing. Except, instead of making a purchase-sell decision every few minutes, they do it every few microseconds. And the returns per transaction are something like... .0000034 per share (this is a guess), but over tens of thousands of shares, and millions of times a day. Right?

This, however, is where my understanding breaks down completely.

HFT obviously benefits a company that can wield it. If my hedge fund can hire the programmers, run the servers, and buy the licenses to the data then I stand to make huge profits for a minimal investment when my HFT "algobots (lol)" do their thing. But I don't understand how this benefits the rest of the market?

I'm guessing that most of these HFT bots are not being run by small-time investors, and in fact that the trades made by small-time investors will be heavily influenced by the HFT trades that are made in-between the time the guy using E-Trades can point on the "Buy!" button and the time he can click on it.

And as a consumer who does not participate in the stock market (in that I do not have an investment portfolio, I realize that the stock market influences me regardless of whether or not I put money into it), I really don't get how HFT helps me.

What it looks like to me, is that players who have the most money, and who have the best technology will have a benefit over players who lack those resources. And so while there's no evidence (that I'm aware of) that these HFT-using companies are committing any malfeasance, it looks like the natural side-effect is that the market becomes more one-sided.

I would liken this to a professional athlete using steroids (let's pretend that steroids aren't illegal). Steroid use may stem from the player simply wanting to maximize their ability to use their body, and so they enhance their muscles and work hard to be able to control them. This player isn't actively trying to cheat, he is simply using technology to overcome a natural hurdle (let's also assume that this same player has, through hard work, literally pushed their body to the limit of what it can naturally achieve). However, a similar player who has also pushed their body to the limit is either unable or unwilling to use steroids, and thus they are unable to compete against the other due to the slight technical advantage.

Is this a true analogy?