In general, you may take a Hardship Distribution from your plan. If your plan allows loans, you must use the loan feature before you request a Hardship Distribution.
In order to request a Hardship Distribution you must provide documentation of one of the following financial hardships.
Expenses for the repair of damage to principal residence
Currently, all distributions from retirement plans are subject to taxes and, if you are younger than 59½, penalties.
These are only general rules, your plan will have specific rules concerning hardships.