So, a “confederation” in simple terms is a kind of club of states that have decided to unite for certain common goals, but at the same time do not lose their independence. Each state in the confederation remains itself, with its own laws, government, and rules, but they agree to cooperate on some important issues, such as defense or the economy.
If you still don’t understand “what a confederation is,” imagine a few friends who decided to buy a large pool together. Each of them can use the pool, but at the same time, each has their own home and decides how to live in their own residence.
Confederate states work in such a way: they only jointly decide on those issues that are important to them as a group. For example, Switzerland at certain periods in its history was a confederation where cantons (regions) had a lot of autonomy but cooperated for the common good. Thus, a confederation is essentially a community of states that allows them to cooperate without losing sovereignty.