All the cells in an organism carry the same genes, but the structure and function of different cells varies. This is because not all the genes in a cell are expressed - they are selectively switched on or off.
Because cells show different gene expression, different proteins are made and these proteins modify the cell - they determine the cell structure and control cell processes.