State & federal tax question

So on the w-4 if you choose to take out extra money, does that go on your state or federal tax?

At one job I didn’t make enough to take out any tax. And I decided on the w4 to take some out. But it went to state.

At this new job I’ll make enough for federal so would the extra I take out go to federal or state?

Idon’t understand how this works