Unemployment can be voluntary or involuntary. Voluntary unemployment is beneficial since it is chosen by persons as their preferred alternative. Some people chose to retire from the workforce and live off their pensions. Millennials are known to take a “gap” year between graduating college and starting a career. Such forms of unemployment are beneficial. Likewise, employers benefit when choosing a preferred candidate over a less-preferred one in filling a position. Since employment requires a mutually-beneficial exchange of labor services between the worker and the employer and searches are required by both parties to find the best “fit”, unemployment during the search process can be chosen by workers and employers and therefore, be beneficial.
Involuntary unemployment harms someone. It occurs, mainly, when the state criminalizes certain terms of employment. A legal minimum wage above the market wage can result in involuntary employment. Both the employer and the worker would benefit from employment, but the employer refuses to hire the worker under penalty of law.
Here is an article on the topic by Hans Hoppe: