Federalism is a mode of government (mixed or compound) which combines a general government (central or ‘fderal’) with regional governments (provincial, state, cantonal, territorial, etc.) in a single political system. The main idea of such a structure is that the local governments (in case of United States, for example, those are state governments) and a national government (the Federal Government) share their powers approximately equally. This structure is opposite to a Confederacy, where the local governments hold significantly more power, or to a Unitary Government, in which the national government holds considerably more power than local authorities (like it is done in Russia). Generally, federalism can be defined as a form of government in which there is a division of powers between two levels of government of equal status.
Federalism as a state structure is important because it allows people, who live in different states and have different needs (or interests) to set policies suited to the people in their state, but still come together with other states as one nation. It is clear that different states have different physical resources, and their populations have different interests and needs. So, an adoption of laws from one state in another seems more illogical, than legit. There are limits on what states can do, of course. As they all are still a part of one country, they obey to general laws and regulations of the country. But federalism brings one huge benefit; other structures cannot guarantee: it grants states a relative freedom in local decisions, thus meeting their needs, but keeps them all together in one united country at the same time. So, for example, United States of America is simutaneously diverse (as much as it can be) and unified.
This is a short explanation of it, as I see it. Still, if you need more information, I would recommend you to read some investigations on the topic. Like a “a comprehensive definition of Federalism” or ‘The analysis of federalism”.