If you are asking "How do I get a hardship withdrawal from my employer?" then you have to ask the employer. Every employer is allowed to decide what hardships they will allow.
If you are asking "How do I report a hardship withdrawal on my tax return?" you should have gotten a 1099-R from the plan. Enter it in the program. Click next to get to some followup questions about penalties. Remember that all 401k withdrawals before age 59-1/2 are subject to regular income tax plus a 10% penalty. There are some specific exceptions to the 10% penalty, but a "hardship" from your employer is not enough. The penalty exceptions are very specific. See this page,
https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-topics-exceptions-to-tax-o...
For example, you can claim an exemption for up to $1000 for a personal emergency. If you withdrew more than $1000, you will still pay the penalty on the rest of the withdrawal.