That depends largely on whether you originally contributed that money before or after paying taxes on it.
Pretax contributions
When you withdraw money that you contributed on a before-tax basis from your retirement plan, that money is taxed as ordinary income.
After-tax contributions
If you contributed money to your retirement plan on an after-tax basis you won’t have to pay taxes. However, note that any earnings from these after-tax contributions are still taxable.
Roth contributions
You may hold a retirement plan that allows Roth contributions, which are made with after-tax money. You can withdraw money from those accounts tax free as long as you take the money at least 5 years after January 1 of the year in which you first contributed to that plan, and you are either age 59 ½ or older, or considered disabled.
Note on early withdrawal penalties
For any retirement plan, there are penalties for taking money out if you're younger than 59 ½. Any money taken from a retirement plan is generally subject to a 10% early withdrawal penalty (unless certain conditions are met).