Simple. Mother Pokemon is the baby that comes out. Ex: here's a Mommy Lillipup; Lillipup comes out of the egg. The father determines the Pokemon's egg moves.
Let's do an example.
You have a female Stoutland. Stoutland is in the "Field" egg group.
You want the baby Lillipup to know the move "Howl". So, you figure out that Houndoom can learn Howl, AND it's in the "Field" egg group.
You obtain a male Houndoom, teach it Howl, and put them together in the day-care. A baby Lillipup will appear that knows Howl!