If I take an early withdrawal from my 401k, where does the IRS take the 10% penalty from? Does it come out of my tax return or is it a separate fee?

Under 59yrs old, taking a $25k withdrawal both state and federal taxes being held upfront