Attackers use vulnerabilities of smart contract to exploit them by creating or spoofing transactions.
Example Frontrunning: Frontrunning is the takeover of an unconfirmed transaction created by another person by paying higher transaction fees and changing the priority of transactions for miners. On Ethereum all unconfirmed transactions are visible to everyone in the mempool before a miner includes them in a block. Attackers can exploit this circumstance to manipulate coin/token prices in decentralized exchanges (see sandwich attack).