They go to both and then there are the city and county and townships. This question is very complicated and I wonder if anyone really knows the answer to it, even those who work in the government.
When I lived in Wisconsin, we had to file papers and pay State Tax and Federal Tax, and then there were property taxes that went to the city, and other utilities that were run by the city that had to be paid to them. I knew that the schools were funding mostly by local taxes, but the federal government also pitched in. Can’t remember how or how much. I knew there was federal funding for roads too, but I can’t remember how or how much.
I think there are ‘Programs’ that are run by State authorities and funded by federal government. Certain welfare programs for single mothers, for example. I am sure my sister knows more about this, she works for the State of Wisconsin.