How do we get morals? The Bible often makes references to the law being written on our hearts, for example:


  The mouth of the righteous speaks wisdom,
           And his tongue talks of justice.  The law of his God is in
  his heart;
           None of his steps shall slide.


Psalm 37:30-31 (NKJV)

I know it's not being literal when it says the law (morals) are written on our hearts. So how do we get morals?


Are we born knowing (genetic?).
Is it spiritual and morals are
transmitted to our brains from our spirits?
Are they learned from reading the Bible?
Are they passed down from generation to generation?
Something else?


Background (my justification for asking the question)

I'm an agnostic atheist and an emotivist. I enjoy watching debates between atheists and theists.

The theists frequently ask the atheists:


  If god isn't real, then how do you know what is right and wrong?


Which is a good question, but I rarely hear the reverse asked:


  If god is real, then how do you know what is right and wrong?


Thanks.
If you are asking how is morality defined, or "who decides what is moral and immoral?" then Christians believe that God decides that, and that He makes His will known to us through various means, like the Bible, tradition, revelation, prophets, etc. Various Christian religions dissent on the exact details here.

If you are asking how people become moral, then a big, big part of morality comes from education, from family, society, etc. Morality is certainly taught and Christ is described as a teacher very clearly in the Gospels.

Its also quite evident if you look at different Faiths. Muslims truly consider immoral to eat pigs, whereas Christians wouldn't flinch. If morals were innate we would all share the same morality, which we clearly don't.