Yes, you will pay a penalty on an early withdrawal from a traditional IRA or 401(k) plan. At tax time the plan administrator will send you a 1099-R which you will use for completing your tax return. You'll deal with it at that time. Do note also that there are some exceptions (and the TTX program allows for exceptions). For example, an early withdrawal for a first time home buyer up to a maximum of $10K is exempt from paying the penalty.
but do be aware that *no* *matter* *what* the withdrawal will be taxable income in the tax year you withdraw it. That will increase your AGI for that year and while you may be exempt from paying the 10% penalty on the early withdrawal if you qualify, you are not exempt from paying taxes on it.
The early distribution penalty is calculated on a 5329 form that will be part of your tax return and reported on line 15 of the 1040 form to be part of your total tax.