Whether or not you may withdraw the money in your retirement plan at any time depends upon the type of retirement plan.
Generally, with regard to an IRA, you are allowed to withdraw any amount any time. However, if you are under 59 1/2, the 10 penalty tax will apply unless you meet one of the exceptions. By law, you may not borrow from your IRA, sell your IRA, or give your IRA away. Any of these transactions would be deemed to be a distribution of the IRA to you and subject to income taxation.
For Qualified Plans, normally you cannot withdraw money from the plan while you are still employed (known as “in-service withdrawals”). Some typos of Qualified Planes (like a 401 (k)) might allow you to borrow money from your account. However, under federal law, the maximum amount you can borrow is the lesser of 50% of your vested account balance or $50,000. Also, you must still pay interest on the amounts borrowed. You should check with your employer to see if your Qualified Plan allows for loans to you. Additionally, some unreimbursed medical expenses, college education expenses, funeral expenses, and the purchase, repair, or foreclosure prevention of your principal residence. There are strict rules determining “hardship” including the requirement that you have no other fund in which to meet the need. Finally, hardship withdrawals are still subject the 10% penalty tax for early withdrawals. Again, you should check with the Human Resources department of your employer to see if hardship withdrawals are allowed.