The Civil Rights Act of 1964 relates to federalism because it takes some power away from the state governments and gives it to the federal government.
In our system of federalism, some powers are given by the Constitution to the state governments while others are given to the national, or federal, government. This is what federalism is all about. Anything that changes the balance of power between these two levels of government is related to federalism.
One thing that states typically have the right to decide for themselves is the rules about private businesses like hotels and restaurants. States generally have the power to set rules about things like health and safety standards for businesses within their own jurisdiction. The Civil Rights Act took some of this power away from the states. It created a national law saying that no private business could discriminate on the basis of (among other things) race. This took away states’ powers to do things like mandating segregation.
When this law was passed, powers were taken away from the state governments and given to the federal government. For that reason, the law was related to federalism.
Federalism refers to the system of governance where sovereignty is constitutionally divided between a federal government and its constituents, meaning states. The US is a federal nation and the powers are divided between the federal government and the state governments.
Unfortunately, several states (especially the ones in the south) were using some of these powers to continue with the practice of segregation of African American communities. An example was the use of the National Guard by the then Arkansas Governor to prevent nine black students from entering the school in Little Rock, Arkansas. It was only the intervention of President Eisenhower and US Army that allowed the students' entry into the segregated school.
The 1964 Civil Rights Act amended this (and similar power misuse) by redistributing powers between the federal and the state governments. An example is the prohibition of the use of racially discriminating criteria by the states in distributing federal aid money. It also prohibited the States from denying access to public facilities to anyone on the basis of race, color, religion or national origin. The Act also made it easy for someone to move a civil rights case from state court to federal court.
In essence, the 1964 Civil Rights Act curtailed some powers of the States and gave more authority to the federal government to ensure uniform civil rights for all citizens; while still maintaining the federal nature of governance.