Charles Dickens went to work at a blacking warehouse, managed by a relative of his mother, when he was twelve years old. His brush with hard times and poverty affected him very deeply. Dickens later recounted these experiences in the semi-autobiographical novel David Copperfield. It is regarded by many critics as a veiled autobiography of Dickens. In the preface to the 1867 edition, Dickens wrote, "like many fond parents, I have in my heart of hearts a favorite child. And, his name is David Copperfield".

In this novel, David, the protagonist is seen as Dickens himself. It is evident from many incidents and feelings. The fact that he begins this novel as a narration in the first person is not a mere dramatic function. Moreover, the suffering, struggles and achievements of David and his surroundings can be traced in many ways to real things in Dickens’ life.

Also, Dickens has tried to throw light on the evils prevailing in his society. It was a time when power was concentrated only in the hands of a few capitalists and wealth was dominating the prestige. Conditions of the prisons and workhouses were very miserable. Dickens remembers his childhood and other life experiences; and, he is using them in great detail as a basis for events in David Copperfield.

So, while it's held that much of David Copperfield is semi autobiographical, it is still just fiction colored with Dickens’ personal experiences and feelings.

More Info: en.wikipedia.org