A race attack is executed when an attacker creates two conflicting transactions. The two transactions are created with the same funds at the same time, with the intention of spending those funds twice.
The first transaction is sent to the victim, who accepts the payment without waiting for confirmation of the transaction. At the same time, a conflicting transaction returning the same amount of crypto to the attacker is broadcast to the network. It tends to cause the funds to be directed in two different payments with a double-spending intention.