Gaps in employment can be a red flag that might disqualify you as a candidate in the eyes of some employers. When writing your CV it is important to list any periods of unemployment in such a way as to alleviate any negative feelings the reader may take away. Understanding how and when to address your lapses in employment can help make the job search a lot less stressful.
If you're currently employed and seeking work, the end dates of your last job will reveal the fact that you're out of work. If the gap is a few weeks to a month, there is really no need to explain in the body of your CV. Instead your reason for leaving the position or for being let go can be written into your cover letter. Keep the explanation short and sweet and allow the employer to question you further should the issue come up during your interview. Focus all of your communications and efforts on what you've accomplished as hard evidence of your success. The little details like a layoff will be passed over more quickly than you think.
If you've been out of work for a significant stretch -- one year or more -- try your best to package the time off as a learning period. Show how you were engaged in activities that led to the accumulation of expertise or skills that helped make you the great candidate you are today. Things like school enrollment, volunteer work, freelance positions and travel can all add valuable facets to your overall profile and make you a more desirable employee.
Sometimes the factors behind your employment lapses are more important than the lapses themselves. Responsibility is not only demonstrated through employment, so don't be afraid to make it clear you were not working for good reason. For example, if you had a child and had to stay home to take care of her your priorities may have changed for a time. If someone in your family fell ill or required assistance in some way, it is perfectly understandable that your attentions may have moved away from your career for a time. Employers will not judge you harshly for doing what you had to do.
You can be honest about your job history while omitting the fact that you may have had some gaps here and there. For example, let's say you worked for a company from June 2010-to-June 2011, before being laid off for five months. The next job you held began in December 2011, leaving a large gap that invites questions from potential employers. Instead of writing a traditional CV with the months and dates of every position, write only the years: "Job 1: 2010-2011" followed by "Job 2: 2011-current." The result can look a lot better and deflect some of the doubt that a more detailed list may create.