A federal system splits governing authority between a national government and constituent states, provinces or republics, each holding powers the other cannot simply overrule. That division is usually written into a constitution rather than left to ordinary law, precisely so that neither level can dissolve the other's authority through routine legislation.
Federalism as a deliberate design begins with the United States Constitution of 1789, which built a national government strong enough to act as one country in war and commerce while leaving the states with their own governments, courts and considerable domestic authority. The compromise answered a real fear among the former colonies: that a single centralized government would recreate the distant, unaccountable rule they had just fought a revolution to escape.
The design proved exportable. Federal constitutions followed in countries as different as Germany, India, Nigeria, Brazil and Switzerland, each adapting the same basic principle, two or more levels of government with independent constitutional standing, to bind together regions with their own languages, religions or histories inside one state without erasing their separate identities.