Confederations are friendly pairings of alliances recognized by the game software. (Until early 2008 they were called "alliances", which was a little confusing.)
A confederation is a stronger relationship than an NAP. Confederates are expected to render military assistance to each other for mutual defense or attacks.
Given the limit of 60 players per alliance, alliances that want to support more than 60 players must create two or more in-game alliances (often with similar names). A confederation between the two "wings" (in-game alliances) signifies their partnership. A sufficiently large group of alliances working together is often called a "meta-alliance".
Having a "confed" with another alliance is generally a good idea if the sides of each alliance wish to be perceived as more powerful. Also, simply having a connection to a larger alliance may stop people from farming and/or taking your villages when there are other, less well-connected players of whom they can take advantage (on the other hand, a confederation like this could make you appear strong enough to be a threat, which could have the opposite effect).
If you wish to join a confederation, the easiest (and most polite) way to do so is to propose it to the alliance leader. Being discourteous or impolite is generally frowned on and could result in a refusal.
When waiting for a reply it is a wise thing to stop messaging the alliance leader; spamming isn't a good idea. When unable to get a reply it is wisest to turn to another alliance.
During the Endgame, many alliances will enter a meta alliance to have a better chance to successfully build a Wonder of the World. This makes it easier to have two World Wonder Plans within an alliance. The new meta-alliance will then have a better chance of completing a Wonder, and winning the game.