OK, this one annoys me. People always !@#$%*ing and comparing 50 different kinds of treaties. It's all wrong. There are 5 types of treaties, and no more.
MDAP - The highest treaty, requires two parties to always go to war along side each other. I would like to make a special note here - This is not the same as signing away your sovereignty. You always have the sovereign right to cancel a MADP in times of peace. But when war is on, you'd better honor your agreements. "Sovereignty" is not a valid reason for cancelling or refusing to act on one of these in times of war.
MDoAP - Basically the same as above, but you get a little room to say "If you start a war we don't like, and start to lose that war, we don't have to lose that war with you." All MDP's are actually MDoAP's. People who compare the two as if they are different are idiots. Because basically, you can always say "Oh well they are taking this action in defense of their interests and we're going to help them defend those interests." When a MDoAP includes one of those "no chaining" clauses (Which I'm just going to note is essentially telling them that you don't really consider each other that great of friends), then jumping in is only mandatory if they receive the initial blow in a war. Without that clause, it's mandatory whenever anyone declares on them, regardless of the progression of the war. As above, "sovereignty" cannot be used as an argument to ditch the obligations, and while it's in incredibly bad form, it's not actually wrong to cancel one of these if obligations were not invoked.
oDoAP - For the reasons outlined above, oDP's are actually oDoAP's, as are PIAT's. Basically, these give you an excuse to chain in to whatever conflict you want to, without being called a "bandwagoner" or a rogue alliance. These treaties are strictly worth less than anything with an 'M' in it. Do not, under any circumstances, ever write a "non-chaining clause" into one of these.
NAP - Simply says that two parties will not attack each other. Can be cancelled whenever either party fancies, so you should write a long cancellation period into it; These are literally worthless with nothing more than a 48 hour notification period. Put some meat into it and make it at least two weeks. A NAP supersedes any action required by even a MADP.
Other - This isn't really a 'type' of treaty, but more of a category - A catch-all for the oddball treaties. Things that don't fit into the first four types are relatively rare though, and frequently don't have an impact on war. If you sign a treaty where you both agree to sit down and watch Saturday morning cartoons over a bowl of cereal every weekend, that's great, but irrelevant to the point of this discussion.
A super special note on cancellation periods - When a treaty says you must give X days notice before cancellation, the treaty is still fully active for that period. If the treaty makes an explicit note that it reverts to something else the instant notice is given, then it never was whatever kind of treaty it was pretending to be, it was only ever whatever it reverted to, plus oDoA if it was one of the first three.
That means if you notify a party that you're cancelling the NAP, you'd better not attack them until the period is up (And the party you cancelled on should make every preparation in that time to prepare to receive you in war - this is the exact purpose for the NAP). If you're unsatisfied with a MADP partner's conduct, you can't submit notice and then claim the treaty is instantly invalid, because it's not.
A note on treaty conflicts - Having allies on both sides is not a treaty conflict. Having allies directly fighting each other is. If two treaties tell you to do two conflicting things, then, and only then, is there a treaty conflict. Inaction is usually the only proper resolution to a treaty conflict (barring a conflict between highly unusual treaties, the response to conflicts between any of the first four are all well defined). You must still fulfill any other obligations that arise separately from the conflict. And yes, you must enter both sides of a war if your treaties demand it.
A note on staying out of war - Unless a treaty says it, the only other time you are permitted to not honor a treaty obligation is if the other party (or in the case of a bloc, every other party) gives their explicit permission for you to not honor whatever particular terms they release you from.
A note on leaving war - You can only leave the war honorably with the blessing of each and every one of your allies that you are leaving behind in the conflict. You don't need the blessing of the entire coalition, just those direct allies with an activated 'M' clause. If you entered on an 'o' clause, you can leave whenever you fancy, though you'll get your ass chewed for being a coward if you tuck tail and run too soon.