A federation is one of the three most common structures of a state. The other two are confederation and unitary. Hence, it is a form of government that defines how power is structured. In other words, the relationship between certain levels of government.
A federation is a state that consists of more states. Each of these states has its own government. But, there is also a federal (or national) government. In this system, the federal government shares some of its powers with the state governments. Hence, it is decentralized.
Besides, the federal government has a strong position. While it is not as powerful as a unitary system, it has more rights than a confederation. On the other hand, it also allows the state governments to be influential. The positions of the two levels of government are more or less balanced.

Structure of a Federation
The federal government always represents all the states outwards. Hence, it is in charge of foreign policy – it manages diplomacy, declares wars, and so on. Thus, it holds sovereignty.
Further, it controls the military and national security in general. Besides, it has power over the currency, postal system, or international and interstate concerns.
Secondly, the individual states take control of schools or health institutions. More importantly, it establishes local government (in towns and counties, etc.). The individual states usually have the same powers. So, they are equal. However, it is not a rule.
Lastly, the two governments can also share some powers. A great example is taxes. Both of the two can set their taxes. Hence, the citizens pay both federal and state taxes. Of course, they can both make laws. Thus, they can both enforce these laws. A problem may arise if a state law conflicts with federal law. In such a case, the federal law is supreme.
An example of a federation is the United States. They are made up of 50 states. Further, the United Arab Emirates, Germany, Argentina, Mexico, Malaysia, and more are federations. As of 2021, there are 27.