Classic example: transferring money. Transaction A locks account 1, then tries to lock account 2. Transaction B has locked account 2 and is waiting for account 1. Both wait forever.
MySQL and other databases automatically detect deadlocks and "kill" one of the transactions (the one with fewer changes). That transaction ends with an error and must be retried by the application.
SELECT ... FOR UPDATE only where genuinely necessary