Attached was a rather amusing ticker-tape of the bid/ask in a particular stock that I track:
So the algorithm is to raise the asking price a random and rising value from roughly 14-16 cents a share, increasing range, each and every second.
Just imagine if you were the programmer doing this and accidentally got the code mixed up so you were doing the OPPOSITE. Good programming has many layers of fail-safes to prevent this malicious code from ever breaking through, but once in awhile these result in flash crashes. Knight Capital on August 1, 2012 was another famous example (blowing up their own firm on a single trading day).
If you are the counter-party on these incidents you have to react very quickly to take advantage of errant trading. It is rare when this happens. Mistakes like this also affect illiquid products much more.