The moral of a story is the lesson that story teaches about how to behave in the world.
Moral comes from the Latin word mores, for habits. The moral of a story is supposed to teach you how to be a better person. If moral is used as an adjective, it means good, or ethical. If you have a strong moral character, you are a good member of society. If someone is a cheat and a liar, you might say, "She is not a moral person."