When you send a transaction it sits in the mempool until a miner or validator picks it up, usually choosing the ones that pay the highest fees first.
A transaction stuck there can often be sped up by re-sending it with a higher fee. Bots watch the public mempool to run front-running and sandwich attacks.