All cells in human body have same 46 chromosomes. Then how can cells functions different task? how they have different shape?
like liver cell, brain cell, skin cell

yes, all cells have the same DNA and the same 46 chromosomes. but, the different traits on these chromosomes may or may not be brought out in different cell. i.e. Those traits are not active in normal cells. Take for example a nerve cell and the insulin producing beta cells in the pancreas. Both have the capacity or ability to produce insulin, but this ability is rendered active only in the beta cells, not in the nerve cells. how exactly does it know where to be active and not active? that i'm not sure. (and if that was your precise question, then oops, my bad. :P)