A federation is a group of countries which share air defense (Interceptors and Helicopters ) to defend themselves from enemy attacks.
Defensive resources that are shared during war are air defenses only, so if you or one of your fed members has air defense wings (don’t use these), interceptor wings or helicopter wings (use those two instead) they will act in defense of your country or your fedmate’s country when attacked, assuming they are within range.
The only automatic consequence of joining a fed is the air defense described above. If you don’t put up any interceptor or helicopter wings then none of your forces will do anything at all. The point of shared fed air defense is that it makes it much more costly for an attacker to make headway in attacking a country if he is confronted with air defense wings both from the country he is attacking and from that country’s ally both in the same attack.
A healthy fed will also share information about how to succeed in the game, economic as well as war, through in-game messaging. If they’re really serious they’ll also communicate through an SC chatroom or maybe they’re set up with MSN chat. A really committed fed may have a webpage someplace, and perhaps even a constitution and officers.
Besides sharing air defense a good fed’s members will also declare on enemies who declare war on or possibly even threaten its members. Signing the war treaty is a crude way of doing this, but it may embroil you in wars you don’t really want or need to be part of, at times of day which may be inconvenient. A good fed will also conduct diplomacy to avoid wars or end them before they get out of hand.