Embryonic cells "know" where they are relative to each other by chemical signals, same as in adults. These molecules are known as morphogens (specific examples include the sonic hedgehog and β-catenin). The amount of morphogen in a region of cells determines which gene gets turned on and thus what it develops into. And the amount varies by how far they are from the source of the morphogen. Though AFAIK, scientists don't fully understand their mechanisms yet (like how they are dispersed, how the different concentrations are kept rigidly, etc.).

As for arms, etc., the earliest cells are unspecialized (stem cells). They "define" which becomes what early on by how they are arranged. Remember that their "up, down, left, and right" is relative to them, not to their surroundings. The first multicellular hollow ball of stem cells, the blastula, separates into distinct germ layers during gastrulation - the ectoderm, mesoderm, endoderm. Each of these layers develop into something different upon further division. What develops after that is basically a worm, composed of a series of repeating "segments" (somites) with a distinct head and tail area. Somites are initially undifferentiated. The job of determining which segment becomes what falls on Hox genes. So that for example, one segment becomes the head, another becomes the arm and pectoral girdle, another becomes a rib+vertebra, etc. Hox genes are arranged in clusters within the DNA relative to which gets expressed first. The first hox gene is for the head for example, while the last is for the tip of the tail (the tipmost segment of the coccyx in humans). Though these clusters themselves are often repeated into a kind of redundant failsafes. This page from the University of Utah explains it pretty well. It helps if you view embryogenesis as more or less echoes of evolution in fast forward.

How does an embryo know where to grow limbs etc
If your wife asks, "Does this dress make me look fat?" And you think it does, but you tell her, "Of course not, honey!" Is that a sin?
