Most undergraduate and graduate school applications require two or three letters of recommendation. Depending on whether you are applying to an academic program or professional degree—for instance, business or law school—these letters should come from former or current professors, employers, or supervisors who are familiar with your work and performance.
For academic applications, letters from teachers or professors are generally preferable to letters from employers. Admissions officers are looking to supplement their knowledge of your academic performance and aptitude—gleaned from your transcript and standardized scores—with concrete evidence that you are a dedicated and enthusiastic learner. Remember: most schools nowadays recognize the value of a dynamic, diverse student body and are thus eager to fill their spots with candidates who have been actively engaged in both academic and extracurricular activities. These letters should reflect not only your participation and performance in the classroom, but also your initiative (for instance, through research projects undertaken with the professor, through leadership in group activities, and through active contribution to classroom discussions).
If you are applying to a PhD program, make sure that at least two out of the three recommendations come from people within your field (or from a field that is closely related to the one you are about to enter. for instance, you might have a letter from a political scientist for an application to a PhD in Sociology, but you better have a real good reason to include a letter from your Medieval Poetry professor if you are hoping to enroll in a doctoral degree in Biochemistry).
Letters of recommendation are convenient substitutes for work references: they neatly sum up a previous or current employer's perspective and allow prospective employers to avoid the sometimes awkward and vague conversations that result from interrogating references over the phone about your strengths and weaknesses. In addition, such letters help prospective employers to skirt the difficulties of reaching a reference. Finally, they are also a great advantage for the job-seeker, because they offer concrete, credible, and readily available evidence of past accomplishments and abilities.
If you have been laid off but left the company on good terms, a letter of recommendation will provide prospective employers with a credible, thorough account of why you had to leave the company—for instance, if the layoff was part of a general downsizing.