I think for the most part the difference is that investing consists of investing sum X for a reasonably well-known, predictable return Y: whether Y is coupon payments from a bond, dividends from a stock, royalities from an oil well, rent from real estate. Speculation is purely price-driven, without expectation that cash or value will otherwise transfer to you from the investment.
There is always some overlap, in that my future returns are not guaranteed, might go up or down, and I certainly enjoy capital appreciation as much as anyone; but in my mind, if something doesn't pay me cash regularly in exchange for my investment, it is speculation, pure and simple. So in that context, the vast majority of participants in the stock market, including most mutual fund and 401k participants, are purely speculators.
I know that sounds extreme, but IMO most such participants blindly send money to their 401k every month and hope it sticks, with no basis for a expected return other than "past performance" over a time frame that is itself arbitrarily chosen. And that also includes stockholders of BRK, everyone's favorite sacred cow; Buffet himself is an investor, focused closely on expected cash flows, but the individuals who buy BRK stock are simply speculating that Buffet will do well.