The answer to this question is dependant on the timespan and way it occurred. If you have a current work gap that is a year or longer, you can provide a somewhat similar answer as the example below.
If you haven’t done anything productive, then I’d suggest you to follow some workshops or online courses that relate to the requirements in the vacancy. Employers want to see that you’ve worked on your professional skills and are ready to get back on track.
“Well, after a number of years studying at [University Name], I took a sabbatical year to visit industry specific events, meet new like-minded people and further educate myself on [Subject] through online courses. For example, I’ve immersed myself in learning the ins and outs of [Topic 1] and [Topic 2] listed in the job description. I’m excited to put my knowledge into practice and contribute to [XYZ Company]’s objectives.”