An Alliance is when two or more nations are allied for a common goal. Unlike Peace, nations in an alliance can construct buildings within allied nations' territory and have military units traverse without suffering attrition.
If nations are granted to freely make and break alliances, computer-controlled nations will often demand a specific amount of a particular resource (such as oil and metal) to continue the alliance. If not, it is possible to demand and send resources to CPU nations.
Similar to peace, allied players cannot attack each other without declaring war (with a few exceptions; for example, if a Nuclear ICBM has been launched and has detonated on an allied nation, the target can then declare war).
While offering benefits, Alliances can be extremelly dangerous, allowing military units to pass through your territory without any attrition damage and have military buildings in your territory. In an Alliance you should always be extremelly wary about allied troops being placed near your Capital City, specially if you are playing in Sudden Death or your ally has researched World Government, also be careful of the Super Collider as it could lead to your ally immediately resarching World Government. You should never allow your ally to station troops in your Capital City without a very good reason (like defending your capital from a heavy enemy invasion), if your ally do it always keep enough troops in your Capital to fend off a possible takeover. Do not allow barracks or Airbases in your capital city as they can be exceptionally helpful for a treacherous ally in bringing you down. Also be extremelly careful if you find Bombers being sent to your capital city, it could be an almost certain sign of an imminent betrayal. Finally if you find your Capital City in a very compromising situation a possible retaliation strategy could be to hold your Ally's capital city hostage. However this is only when playing with other human players, CPU nations will never peform allied treachery.
As stated before, an Alliance can be an extremelly good choice for players that prefer to sneak tactics and have easy victories with relatively no effort, specially if you are playing Sudden Death. One way to do it is to ally yourself with a stronger nation and pump resources to the ally to take care of enemies, you should always be ensure that the enemy is concentrated in fighting your ally and does not attack you, instead focus on building your forces and economy. Also try to make sure that your ally army is busy fighting the enemy far away. The point of this strategy is what when your ally is at its strongest and the enemy at its weakest (usually when the enemy is close to being conquered and your ally has a big empire) you will conquer your ally by attacking its Capital City allowing you to quickly conquer it with minimal fighting, then easily crushing a weakened enemy with your new empire. There are many ways to do this, however you should by all means avoid attacking if you have to go through a conquest timer, you will have to face a very costly battle, the enemy will take advantadge and may recover in the meantime and it will be extremelly hard to keep your former ally from regaining its capital. Rather it is best to have the World Government to eliminate the timers, you can use a nuclear weapon to easily decimate the city and take it over with your army before your ally has time to do anything but you will lose the industry placed at the Capital City. The best strategy is to have the Super Collider, a citizen hidden in your ally's Capital City, Aritificial Intelligence researched and the World Government ready to be researched, this will reduce your ally's suspicion to the minimum since don't have the lethal World Government researched neither military presence in its capital. When the time has come research World Government and have the citizen build a Barracks in the Capital City, then create quickly an army of Flamethrowers ready to attack the capital at mouse click, do not declare war until everything is ready. If you do this right you will have victory guaranteed, the Flamethrowers can easily conquer the Capital City in less than 10 seconds, leaving your former ally no time to even call back its army, this will leave the now defunct army in perpetual fighting with your enemy and you will have conquered your ally's nation with all its industry intact, territory and with no fighting at all. Then with your new empire proceed to steamroll the enemy. The main purpose is to have the Flamethrower army stationed in the allied capital and World Government enabled, this is the core of the strategy, so lethal it is that actually if you are playing against a human ally then you can easily blackmail it into doing anything, once the Flamethrowers are in place and the World Government is activated you have for all intents and purposes conquered your ally's nation, if your ally is moving its troops to defend its capital simply declare war and conquer it immediately before the defense can be positioned.
Likewise, if you're the player under the potential threat of treachery, you may fortify your capital and leave an army in it or in close proximity if nukes are expected. With this, even if the captial is reduced, the military presence of even only fortifications will prevent it from being taken.