beat off

US /biːt ɔːf/
UK /biːt ɔːf/
"beat off" picture
1.

to masturbate (vulgar slang)

:
He was caught beating off in the bathroom.
Some people use pornography to beat off.
2.

to repel an attack or an attacker

:
The defenders managed to beat off the enemy assault.
She used a stick to beat off the aggressive dog.