The United States was a confederation before it became a federation in 1788 and the main differences between a confederation and a federation is that the membership of the member states in a confederation is voluntary, while the membership in a federation is not.
Another difference is that the sovereignty in a Confederation, the federal government is accountable to the member states, who are the ultimate authority. On the other hand, in the case of the federation, the federal government is held the ultimate authority while the member states are subordinated to them.
Besides, in a confederation the central authority is a body appointed by the member states and in a federation the central authority is the federal government.
In addition to this, the powers of the central authority in a confederation focus on joint foreign policy and defense matters. And in the case of the federation, it has rights to exert control over the military, economic, legal and diplomatic areas of the member states.