A federal system of government divides it like that. There's a set of federal laws and all members of the federation have to abide by them. If a federation doesn't have specific laws about something, then the states can each have their own laws about it, until the federal government decides to make a law about it.