Courts balance state police powers and the federal interest by employing a form of judicial scrutiny where state laws are evaluated to ensure they serve a legitimate local public interest, like safety or health, and are not simply protectionist measures. Such laws must also not excessively interfere with interstate commerce.
For example: A state may impose safety regulations for products entering its market, but if these regulations significantly differ from national standards to the point of hindering producers from other states to compete fairly, courts may rule them as overly burdensome to interstate commerce.