Like most things, these algorithms have pros and cons to them.
Simple put, these algorithms can generate profits at a speed and frequency that is impossible for a human trader.
The defined sets of rules are based on timing, price, quantity or any mathematical model. High frequency trading causes stock market crashes due to how the high frequency algorithms are set up.
If the algorithms detect something that they deem of interest they will certainly act upon it.
An Example - Flash Crash of May 2010
In May 2010, the trading algorithms picked up some signal negative news that was tweeted, and quickly started selling stock. The market dropped 10 percent in the matter of minutes. The algorithms did not bother to figure out that the news was fake, and that people on twitter can say anything.
According to the SEC report that was filed from the investigation of the crash, we learn that this migh have been caused by a signal that ticked off a sell in one algorithm and triggered multiple selling signals which created a cascading effect.
Though this might seem to be completely like the fault of high frequency trading algorithms, some analysts say that we can attribute the occurence of flash crashes to herd mentality rather than just code.
This type of behaviour has been experienced in the markets even in the 1800s and took a longer time to bounce back.