Same ways cells know how to be anything - DNA.
But it could still be a useful answer depending on the viewpoint of the person asking and what they were hoping to learn.
The only difference is today's biologists have replaced God with DNA - the almighty molecule that knows everything about humans.