The heart of an embryo begins to form within 16 to 19 days of gestation, and goes through some very interesting changes before it winds up shaped like a miniature adult heart.
First, the heart of an embryo starts off as a little tube, similar to the heart of a goldfish. As it grows outward, it runs out of room and is forced to double back into a horseshoe shape. Soon, it develops into a two-chambered heart, like a frog's. In time, another chamber develops -- now it looks a bit like a snake's heart. Eventually, the fourth chamber develops, and it takes on the appearance of what it is: a human heart. The embryonic heart starts to beat around the 22nd day of pregnancy. At around four weeks, it's capable of circulating blood.