Prioritise, prioritise, prioritise.
Are any enemies approaching your capital, your CoTs, or your high production value provinces? They're your first priority. Beat them back ASAP.
Are there any minor countries in the opposing alliances which don't share a border with you, and have no army nearby? Offer them a white peace. (Or even better, wait for them to offer you one. They usually will after a year or two). This reduces your enemies' war capacity.
Now, you need to focus your efforts. If you're outnumbered, the worst thing you can do is split your forces and try and fight all of your enemies; you'll be defeated everywhere. Instead, you need to virtually abandon one front in order to concentrate a larger army on the other.
How to decide who to attack:
Is there an enemy country that you can knock out of the war quickly, perhaps by occupying its capital? Then do so.
Do you have a positive war score against any of your opponents? Then try and get a separate peace with them immediately. Don't get greedy and demand provinces; just go for a white peace. If your war score is too low, try sending an army or amphibious force to capture their capital, as above... you don't need to hold it forever, just occupy it then immediately offer peace. Or try blockading them.
Is one enemy spending all its time occupying a bunch of worthless desert and mountain provinces in Central Asia, or beseiging a line of level-5 fortresses? Then leave them to it, and send your troops elsewhere.
Are you still losing the war? Then suck it up and offer one enemy alliance ducats or even provinces to leave you alone. Yes, it's annoying; but it gives you a target for your
next war once you're strong enough again. Revenge is sweet.
After this, work out why everybody keeps attacking you. If you've got a reputation of 98, then that could be the reason.

Or if your army is much smaller than all your neighbours', then you look like a fat, juicy target to the AI. Or maybe you just need to spend money imcreasing your relations with one of your more powerful rivals.