When people within the United States hear talk about a confederation, they think first of the Confederate States of America since it was the most historically visible. People often do not realize (or remember) that the United States actually started out as a confederation.
A confederation is a group of political bodies, typically states, which decide for the sake of making certain things easier they give certain authorities to a central authority figure in order to ensure that like policies exist in these areas for all member states. These types of relationships will often start as a treaty before going on to be more permanently established in a constitution.
Confederations tend to vary in the level of commitment that the member states have to each other within the confederation. Sometimes they are fairly loose with a singular purpose that binds them together. Other times they are fairly tight, bordering on being called federations instead.
When the colonies were initially trying to figure out what their relationship was going to be following the end of the Revolutionary War, there were a few things they knew for certain. They did not want a strong central authority figure and they did not want to give up too much control to anyone else.
However, they did want to have the safety that comes with numbers so they knew they needed to have some kind of formal relationship which was created under the Articles of Confederation.
In time, they discovered that their relationship under the Articles was not sufficient; that for the states to survive and prosper they needed to have a more permanent, lasting, and deeper relationship with a central authority to create and enforce like policies. As a result the Articles and the confederation were ditched and the federalist nation that exists today was formed under the Constitution.