In DeFi, Bots can be used for many attacks like Sandwitch attack where a bot sniffs out the transaction and Front-Runs the victim by purchasing asset Y before the large trade is approved. This purchase raises the price of asset-Y for the victim trader and increases the slippage. bots are also involved in various Twitter scams like recovery scams, impersonation scams, etc.
Bots can also be used in trading with cryptocurrencies, they are called Crypto trading bots. They are bots used to automate trades. They are basically programs that are executed to yield specific results in trades.
https://www.makeuseof.com/what-are-crypto-trading-bots-how-do-they-work/