Some SP tips:
After the independent expansion phase, each AI is going to look to go to war with at least 1 opponent in order to expand. If your borders are not well defended, it's going to be you. Entering a war makes you even more vulnerable, so another opponent will declare war on you, and another and another.
The AI will only declare war on you if it perceives the tangible gain of at least 1 province. It will never attack you if you have a reasonable defense on every border province.
So, the trick to surviving in SP is to put on a strong front long enough for the AIs to choose to attack each other rather than you. One way to do this is to put 21 PD on all your borders. However, this is an extremely poor use of gold, and does not work in multiplayer. However, for chokepoints, and provinces with 7+ neighbors, it might be worth it.
Another way to do this is to have a reasonably large army (40-100+ units) just walk along your border provinces. Large and imposing units seem to help, such as Hydras, Elephants, Troglodytes, etc. The goal is to look like a tough nut to crack, and eventually the AI will pick on a weaker neighbor.
Look at the army size graph. The nations with the smallest army are the most likely to be attacked. Sometimes having large numbers of ultra elite units hurts you here because you appear weak. If this is the case, build a ton of independent archers, woodsmen, crossbowmen, etc. just to boost your graph.
When you do get into a war, the easiest way to win is to force the AI to attack you on your terms (which it will). The best situation is a chokepoint, where you can pump the PD and put a large force to annihilate all attackers. That's rarely feasible, it's more likely that the enemy will raid you. Rather than chasing them around, your closest army should either go right for their castle (shutting down their production) or stand their ground in the most defensible location, while reinforcements from your castles move forward wiping out raiding parties.
You're going to lose a good chunk of cash from lost provinces, but a defensive approach is very powerful in single player. The reason being that the AI has a bigger army than you do, but once you destroy that army, they can't rebuild like you can. You simply have to outlast them, even if you lose a few provinces initially. When you kill enough raiders, what happens is the AI has almost nothing left other than what it can produce in the castle. Then you can take back all your provinces and start the offensive.
Hope this helps get you to the mid-game.