Some laws are made at the federal level and some laws are made by the states. For example, laws on commerce, bankruptcy or taxation are made at the federal level. State and local governments pass laws about property, divorce, custody, and other matters that really don't affect anyone outside of that state.
The U.S. Constitution limits the lawmaking of the federal government to laws that stem from the "commerce clause" which gives the federal government the power to regulate anything having to do with "interstate" commerce or commerce across state lines. For example, federal laws can be made that: