Some matters are designated by the constitution as belong to the federal government, and any powers not granted to the federal government are granted to the states. However, within the context of powers given to the federal government by the constitution, federal laws trump state laws when there is a conflict.
For the most part these divisions between state and federal responsibilities, but the commerce clause, which gives the federal government to regulate commerce between the states, has been interpreted very broadly to give the federal government broad powers even over issues that are only tangentially related to interstate commerce.
The courts have gone back and forth a few times over how broad the commerce clause should be interpreted. If you are interested in the details including some interesting court cases, Wikipedia has a pretty good summary http://en.wikipedia.org/wiki/Commerce_Clause
For the most part these divisions between state and federal responsibilities, but the commerce clause, which gives the federal government to regulate commerce between the states, has been interpreted very broadly to give the federal government broad powers even over issues that are only tangentially related to interstate commerce.
The courts have gone back and forth a few times over how broad the commerce clause should be interpreted. If you are interested in the details including some interesting court cases, Wikipedia has a pretty good summary http://en.wikipedia.org/wiki/Commerce_Clause