Basically, it uses stem cells, which are cells that haven't been specialized into anything yet. Certain proteins determine and highlight specific portions of your DNA and genes which gives a cell it's function, since of course you already know everything holds the same DNA. If you are still confused, there are also many great Youtube videos that can help out with your problem.