When we are on a defensive or in any disadvantageous situation, we use this idiom.
This means shouting at the top of his or her voice.
When people are fighting or competing vigorously then we use this idiom.