Formation of T cell and B Cell?

B Cell B cells begin as stem cells in your long bone marrow.

Next they develop into pro B cells. In this stage of development the variable heavy chains of their antibodies are going under recombination (V,D,J). This is a change in their DNA which is irreversible.

The pro B cells develop into pre B cells. Here the variable heavy chains have finished recombination and the mu of the constant heavy chain is expressed on the cells surface. Each allele for the heavy chain had to undergo allelic expression. You receive each allele from both your parents, however, only one may be expressed. The next step within the pro B cell is to undergo division. This is important to divide at this step before the variable light chains recombine so that you have a large immune repertoire. If your B cells divided after the light chain recombination, all your B cells would express the same antibody. Lastly in this stage, the light chains begin to recombine to add to further diversity.

After all that is finished you have your immature B cell. In this stage the light chain alleles (V,J) have rearranged. Allelic exclusion has finished for the variable chain. The antibody expressed on the cell surface is complete as IgM.

Lastly, you have your mature naive B cell. It underwent RNA splicing of the heavy constant chain and the cell now expresses IgM and IgD on its surface. The B cell is will remain a naive B cell until it becomes activated in your secondary lymphoid system. If during development the B cell's antibodies react with self antigen it will either undergo apoptosis or anergy. Either way the body ensures that your B cells do not react with self before it goes out to your secondary lymphoid system.