If you set the target token, the bot will detect all the txs.
when the profitable tx appears, it will front run that tx to buy/sell the token.
then the token price will change.
after the tx, it will buy/sell the tokens.
you can get profit from this price change.
you can get more idea from googling.